diff --git a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
index b713d35da2bad..eb41e85300d96 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.4 (Unreleased)
+## 1.0.0-beta.1 (2023-07-11)
+
+- Azure Resource Manager Consumption client library for Java. This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/consumption/azure-resourcemanager-consumption/README.md b/sdk/consumption/azure-resourcemanager-consumption/README.md
index 4bc0fe107d500..ebbb8ca7451c8 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/README.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Consumption client library for Java.
-This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2023-05. 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.resourcemanagerazure-resourcemanager-consumption
- 1.0.0-beta.3
+ 1.0.0-beta.4
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md b/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
index a96cb65e90538..ce6f81a7e981f 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
@@ -35,13 +35,19 @@
- [ListByBillingAccount](#lotsoperation_listbybillingaccount)
- [ListByBillingProfile](#lotsoperation_listbybillingprofile)
+- [ListByCustomer](#lotsoperation_listbycustomer)
## Marketplaces
- [List](#marketplaces_list)
+## Operations
+
+- [List](#operations_list)
+
## PriceSheet
+- [DownloadByBillingAccountPeriod](#pricesheet_downloadbybillingaccountperiod)
- [Get](#pricesheet_get)
- [GetByBillingPeriod](#pricesheet_getbybillingperiod)
@@ -80,12 +86,10 @@
### AggregatedCost_GetByManagementGroup
```java
-import com.azure.core.util.Context;
-
/** Samples for AggregatedCost GetByManagementGroup. */
public final class AggregatedCostGetByManagementGroupSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostByManagementGroupFilterByDate.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/AggregatedCostByManagementGroupFilterByDate.json
*/
/**
* Sample code: AggregatedCostByManagementGroupFilterByDate.
@@ -99,11 +103,11 @@ public final class AggregatedCostGetByManagementGroupSamples {
.getByManagementGroupWithResponse(
"managementGroupForTest",
"usageStart ge '2018-08-15' and properties/usageStart le '2018-08-31'",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostByManagementGroup.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/AggregatedCostByManagementGroup.json
*/
/**
* Sample code: AggregatedCostByManagementGroup.
@@ -112,7 +116,9 @@ public final class AggregatedCostGetByManagementGroupSamples {
*/
public static void aggregatedCostByManagementGroup(
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.aggregatedCosts().getByManagementGroupWithResponse("managementGroupForTest", null, Context.NONE);
+ manager
+ .aggregatedCosts()
+ .getByManagementGroupWithResponse("managementGroupForTest", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -120,12 +126,10 @@ public final class AggregatedCostGetByManagementGroupSamples {
### AggregatedCost_GetForBillingPeriodByManagementGroup
```java
-import com.azure.core.util.Context;
-
/** Samples for AggregatedCost GetForBillingPeriodByManagementGroup. */
public final class AggregatedCostGetForBillingPeriodByManagementGroupSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostForBillingPeriodByManagementGroup.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/AggregatedCostForBillingPeriodByManagementGroup.json
*/
/**
* Sample code: AggregatedCostListForBillingPeriodByManagementGroup.
@@ -136,7 +140,8 @@ public final class AggregatedCostGetForBillingPeriodByManagementGroupSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.aggregatedCosts()
- .getForBillingPeriodByManagementGroupWithResponse("managementGroupForTest", "201807", Context.NONE);
+ .getForBillingPeriodByManagementGroupWithResponse(
+ "managementGroupForTest", "201807", com.azure.core.util.Context.NONE);
}
}
```
@@ -144,12 +149,10 @@ public final class AggregatedCostGetForBillingPeriodByManagementGroupSamples {
### Balances_GetByBillingAccount
```java
-import com.azure.core.util.Context;
-
/** Samples for Balances GetByBillingAccount. */
public final class BalancesGetByBillingAccountSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BalancesByBillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/BalancesByBillingAccount.json
*/
/**
* Sample code: Balances.
@@ -157,7 +160,7 @@ public final class BalancesGetByBillingAccountSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void balances(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.balances().getByBillingAccountWithResponse("123456", Context.NONE);
+ manager.balances().getByBillingAccountWithResponse("123456", com.azure.core.util.Context.NONE);
}
}
```
@@ -165,12 +168,10 @@ public final class BalancesGetByBillingAccountSamples {
### Balances_GetForBillingPeriodByBillingAccount
```java
-import com.azure.core.util.Context;
-
/** Samples for Balances GetForBillingPeriodByBillingAccount. */
public final class BalancesGetForBillingPeriodByBillingAccountSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BalancesByBillingAccountForBillingPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/BalancesByBillingAccountForBillingPeriod.json
*/
/**
* Sample code: Balances.
@@ -178,7 +179,9 @@ public final class BalancesGetForBillingPeriodByBillingAccountSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void balances(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.balances().getForBillingPeriodByBillingAccountWithResponse("123456", "201702", Context.NONE);
+ manager
+ .balances()
+ .getForBillingPeriodByBillingAccountWithResponse("123456", "201702", com.azure.core.util.Context.NONE);
}
}
```
@@ -206,7 +209,7 @@ import java.util.Map;
/** Samples for Budgets CreateOrUpdate. */
public final class BudgetsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/CreateOrUpdateBudget.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/CreateOrUpdateBudget.json
*/
/**
* Sample code: CreateOrUpdateBudget.
@@ -287,12 +290,10 @@ public final class BudgetsCreateOrUpdateSamples {
### Budgets_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for Budgets Delete. */
public final class BudgetsDeleteSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/DeleteBudget.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/DeleteBudget.json
*/
/**
* Sample code: DeleteBudget.
@@ -302,7 +303,8 @@ public final class BudgetsDeleteSamples {
public static void deleteBudget(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.budgets()
- .deleteWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget", Context.NONE);
+ .deleteByResourceGroupWithResponse(
+ "subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget", com.azure.core.util.Context.NONE);
}
}
```
@@ -310,12 +312,10 @@ public final class BudgetsDeleteSamples {
### Budgets_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Budgets Get. */
public final class BudgetsGetSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Budget.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/Budget.json
*/
/**
* Sample code: Budget.
@@ -325,7 +325,8 @@ public final class BudgetsGetSamples {
public static void budget(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.budgets()
- .getWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget", Context.NONE);
+ .getWithResponse(
+ "subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget", com.azure.core.util.Context.NONE);
}
}
```
@@ -333,12 +334,10 @@ public final class BudgetsGetSamples {
### Budgets_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Budgets List. */
public final class BudgetsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BudgetsList.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/BudgetsList.json
*/
/**
* Sample code: BudgetsList.
@@ -346,7 +345,7 @@ public final class BudgetsListSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void budgetsList(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.budgets().list("subscriptions/00000000-0000-0000-0000-000000000000", Context.NONE);
+ manager.budgets().list("subscriptions/00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE);
}
}
```
@@ -354,12 +353,10 @@ public final class BudgetsListSamples {
### Charges_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Charges List. */
public final class ChargesListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernBillingAccount.json
*/
/**
* Sample code: ChargesListByBillingAccount-Modern.
@@ -376,11 +373,11 @@ public final class ChargesListSamples {
"2019-10-31",
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesForBillingPeriodByEnrollmentAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesForBillingPeriodByEnrollmentAccount.json
*/
/**
* Sample code: ChangesForBillingPeriodByEnrollmentAccount-Legacy.
@@ -397,11 +394,11 @@ public final class ChargesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByCustomerId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernBillingAccountGroupByCustomerId.json
*/
/**
* Sample code: ChargesListByBillingAccountGroupByCustomerId-Modern.
@@ -418,11 +415,11 @@ public final class ChargesListSamples {
"2019-09-30",
null,
"groupby((properties/customerId))",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfile.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernBillingProfile.json
*/
/**
* Sample code: ChargesListByBillingProfile-Modern.
@@ -439,11 +436,11 @@ public final class ChargesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfileInvoiceSection.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernBillingProfileInvoiceSection.json
*/
/**
* Sample code: ChargesListByBillingProfileInvoiceSection-Modern.
@@ -460,11 +457,11 @@ public final class ChargesListSamples {
"2019-10-31",
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernCustomer.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernCustomer.json
*/
/**
* Sample code: ChargesListByCustomer-Modern.
@@ -480,11 +477,11 @@ public final class ChargesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListForDepartmentFilterByStartEndDate.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListForDepartmentFilterByStartEndDate.json
*/
/**
* Sample code: ChargesListByDepartment-Legacy.
@@ -500,11 +497,11 @@ public final class ChargesListSamples {
null,
"usageStart eq '2018-04-01' AND usageEnd eq '2018-05-30'",
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListForEnrollmentAccountFilterByStartEndDate.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListForEnrollmentAccountFilterByStartEndDate.json
*/
/**
* Sample code: ChargesListForEnrollmentAccount-Legacy.
@@ -521,11 +518,11 @@ public final class ChargesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfileGroupByInvoiceSectionId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernBillingProfileGroupByInvoiceSectionId.json
*/
/**
* Sample code: ChargesListByBillingProfileGroupByInvoiceSectionId-Modern.
@@ -542,11 +539,11 @@ public final class ChargesListSamples {
"2019-09-30",
null,
"groupby((properties/invoiceSectionId))",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByBillingProfileId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernBillingAccountGroupByBillingProfileId.json
*/
/**
* Sample code: ChargesListByBillingAccountGroupByBillingProfileId-Modern.
@@ -563,11 +560,11 @@ public final class ChargesListSamples {
"2019-09-30",
null,
"groupby((properties/billingProfileId))",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByInvoiceSectionId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernBillingAccountGroupByInvoiceSectionId.json
*/
/**
* Sample code: ChargesListByBillingAccountGroupByInvoiceSectionId-Modern.
@@ -584,11 +581,11 @@ public final class ChargesListSamples {
"2019-09-30",
null,
"groupby((properties/invoiceSectionId))",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesForBillingPeriodByDepartment.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesForBillingPeriodByDepartment.json
*/
/**
* Sample code: ChangesForBillingPeriodByDepartment-Legacy.
@@ -605,11 +602,11 @@ public final class ChargesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernInvoiceSectionId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ChargesListByModernInvoiceSectionId.json
*/
/**
* Sample code: ChargesListByInvoiceSectionId-Modern.
@@ -626,7 +623,7 @@ public final class ChargesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -634,12 +631,10 @@ public final class ChargesListSamples {
### Credits_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Credits Get. */
public final class CreditsGetSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/CreditSummaryByBillingProfile.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/CreditSummaryByBillingProfile.json
*/
/**
* Sample code: CreditSummaryByBillingProfile.
@@ -647,7 +642,7 @@ public final class CreditsGetSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void creditSummaryByBillingProfile(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.credits().getWithResponse("1234:5678", "2468", Context.NONE);
+ manager.credits().getWithResponse("1234:5678", "2468", com.azure.core.util.Context.NONE);
}
}
```
@@ -655,12 +650,10 @@ public final class CreditsGetSamples {
### EventsOperation_ListByBillingAccount
```java
-import com.azure.core.util.Context;
-
/** Samples for EventsOperation ListByBillingAccount. */
public final class EventsOperationListByBillingAccountSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsGetByBillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/EventsGetByBillingAccount.json
*/
/**
* Sample code: EventsGetByBillingAccount.
@@ -668,11 +661,11 @@ public final class EventsOperationListByBillingAccountSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void eventsGetByBillingAccount(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.eventsOperations().listByBillingAccount("1234:5678", null, Context.NONE);
+ manager.eventsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsGetByBillingAccountWithFilters.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/EventsGetByBillingAccountWithFilters.json
*/
/**
* Sample code: EventsGetByBillingAccountWithFilters.
@@ -684,7 +677,9 @@ public final class EventsOperationListByBillingAccountSamples {
manager
.eventsOperations()
.listByBillingAccount(
- "1234:5678", "lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'", Context.NONE);
+ "1234:5678",
+ "lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -692,12 +687,10 @@ public final class EventsOperationListByBillingAccountSamples {
### EventsOperation_ListByBillingProfile
```java
-import com.azure.core.util.Context;
-
/** Samples for EventsOperation ListByBillingProfile. */
public final class EventsOperationListByBillingProfileSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsListByBillingProfile.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/EventsListByBillingProfile.json
*/
/**
* Sample code: EventsListByBillingProfile.
@@ -705,7 +698,9 @@ public final class EventsOperationListByBillingProfileSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void eventsListByBillingProfile(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.eventsOperations().listByBillingProfile("1234:5678", "4268", "2019-09-01", "2019-10-31", Context.NONE);
+ manager
+ .eventsOperations()
+ .listByBillingProfile("1234:5678", "4268", "2019-09-01", "2019-10-31", com.azure.core.util.Context.NONE);
}
}
```
@@ -713,12 +708,10 @@ public final class EventsOperationListByBillingProfileSamples {
### LotsOperation_ListByBillingAccount
```java
-import com.azure.core.util.Context;
-
/** Samples for LotsOperation ListByBillingAccount. */
public final class LotsOperationListByBillingAccountSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/LotsListByBillingAccount.json
*/
/**
* Sample code: LotsListByBillingAccount.
@@ -726,11 +719,11 @@ public final class LotsOperationListByBillingAccountSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void lotsListByBillingAccount(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.lotsOperations().listByBillingAccount("1234:5678", null, Context.NONE);
+ manager.lotsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingAccountWithFilters.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/LotsListByBillingAccountWithFilters.json
*/
/**
* Sample code: LotsListByBillingAccountWithStatusFilter.
@@ -742,7 +735,9 @@ public final class LotsOperationListByBillingAccountSamples {
manager
.lotsOperations()
.listByBillingAccount(
- "1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'", Context.NONE);
+ "1234:5678",
+ "status eq 'active' AND source eq 'consumptioncommitment'",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -750,12 +745,10 @@ public final class LotsOperationListByBillingAccountSamples {
### LotsOperation_ListByBillingProfile
```java
-import com.azure.core.util.Context;
-
/** Samples for LotsOperation ListByBillingProfile. */
public final class LotsOperationListByBillingProfileSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingProfile.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/LotsListByBillingProfile.json
*/
/**
* Sample code: LotsListByBillingProfile.
@@ -763,20 +756,55 @@ public final class LotsOperationListByBillingProfileSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void lotsListByBillingProfile(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.lotsOperations().listByBillingProfile("1234:5678", "2468", Context.NONE);
+ manager.lotsOperations().listByBillingProfile("1234:5678", "2468", com.azure.core.util.Context.NONE);
}
}
```
-### Marketplaces_List
+### LotsOperation_ListByCustomer
```java
-import com.azure.core.util.Context;
+/** Samples for LotsOperation ListByCustomer. */
+public final class LotsOperationListByCustomerSamples {
+ /*
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/LotsListByCustomer.json
+ */
+ /**
+ * Sample code: LotsListByCustomer.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void lotsListByCustomer(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.lotsOperations().listByCustomer("1234:5678", "1234:5678", null, com.azure.core.util.Context.NONE);
+ }
+ /*
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/LotsListByCustomerWithFilters.json
+ */
+ /**
+ * Sample code: LotsListByCustomerWithFilter.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void lotsListByCustomerWithFilter(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager
+ .lotsOperations()
+ .listByCustomer(
+ "1234:5678",
+ "1234:5678",
+ "status eq 'active' AND source eq 'consumptioncommitment'",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Marketplaces_List
+
+```java
/** Samples for Marketplaces List. */
public final class MarketplacesListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByBillingAccountListForBillingPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesByBillingAccountListForBillingPeriod.json
*/
/**
* Sample code: BillingAccountMarketplacesListForBillingPeriod.
@@ -787,11 +815,16 @@ public final class MarketplacesListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.marketplaces()
- .list("providers/Microsoft.Billing/billingAccounts/123456", null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/123456",
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json
*/
/**
* Sample code: EnrollmentAccountMarketplacesListForBillingPeriod.
@@ -802,11 +835,16 @@ public final class MarketplacesListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.marketplaces()
- .list("providers/Microsoft.Billing/enrollmentAccounts/123456", null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/enrollmentAccounts/123456",
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesList.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesList.json
*/
/**
* Sample code: SubscriptionMarketplacesList.
@@ -816,11 +854,16 @@ public final class MarketplacesListSamples {
public static void subscriptionMarketplacesList(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.marketplaces()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000",
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByEnrollmentAccountList.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesByEnrollmentAccountList.json
*/
/**
* Sample code: EnrollmentAccountMarketplacesList.
@@ -831,11 +874,16 @@ public final class MarketplacesListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.marketplaces()
- .list("providers/Microsoft.Billing/enrollmentAccounts/123456", null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/enrollmentAccounts/123456",
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByDepartment_ListByBillingPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesByDepartment_ListByBillingPeriod.json
*/
/**
* Sample code: DepartmentMarketplacesListForBillingPeriod.
@@ -844,11 +892,13 @@ public final class MarketplacesListSamples {
*/
public static void departmentMarketplacesListForBillingPeriod(
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.marketplaces().list("providers/Microsoft.Billing/departments/123456", null, null, null, Context.NONE);
+ manager
+ .marketplaces()
+ .list("providers/Microsoft.Billing/departments/123456", null, null, null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByManagementGroupList.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesByManagementGroupList.json
*/
/**
* Sample code: ManagementGroupMarketplacesList.
@@ -859,11 +909,16 @@ public final class MarketplacesListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.marketplaces()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000",
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesListForBillingPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesListForBillingPeriod.json
*/
/**
* Sample code: SubscriptionMarketplacesListForBillingPeriod.
@@ -874,11 +929,16 @@ public final class MarketplacesListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.marketplaces()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000",
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByDepartmentList.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesByDepartmentList.json
*/
/**
* Sample code: DepartmentMarketplacesList.
@@ -886,11 +946,13 @@ public final class MarketplacesListSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void departmentMarketplacesList(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.marketplaces().list("providers/Microsoft.Billing/departments/123456", null, null, null, Context.NONE);
+ manager
+ .marketplaces()
+ .list("providers/Microsoft.Billing/departments/123456", null, null, null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByManagementGroup_ListForBillingPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesByManagementGroup_ListForBillingPeriod.json
*/
/**
* Sample code: ManagementGroupMarketplacesListForBillingPeriod.
@@ -901,11 +963,16 @@ public final class MarketplacesListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.marketplaces()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000",
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByBillingAccountList.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/MarketplacesByBillingAccountList.json
*/
/**
* Sample code: BillingAccountMarketplacesList.
@@ -916,20 +983,61 @@ public final class MarketplacesListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.marketplaces()
- .list("providers/Microsoft.Billing/billingAccounts/123456", null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/123456",
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
}
```
-### PriceSheet_Get
+### Operations_List
```java
-import com.azure.core.util.Context;
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/OperationList.json
+ */
+ /**
+ * Sample code: OperationList.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void operationList(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### PriceSheet_DownloadByBillingAccountPeriod
+```java
+/** Samples for PriceSheet DownloadByBillingAccountPeriod. */
+public final class PriceSheetDownloadByBillingAccountPeriodSamples {
+ /*
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/EAPriceSheetForBillingPeriod.json
+ */
+ /**
+ * Sample code: EAPriceSheetForBillingPeriod.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void eAPriceSheetForBillingPeriod(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.priceSheets().downloadByBillingAccountPeriod("0000000", "202305", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### PriceSheet_Get
+
+```java
/** Samples for PriceSheet Get. */
public final class PriceSheetGetSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheet.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/PriceSheet.json
*/
/**
* Sample code: PriceSheet.
@@ -937,7 +1045,7 @@ public final class PriceSheetGetSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void priceSheet(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.priceSheets().getWithResponse(null, null, null, Context.NONE);
+ manager.priceSheets().getWithResponse(null, null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -945,12 +1053,10 @@ public final class PriceSheetGetSamples {
### PriceSheet_GetByBillingPeriod
```java
-import com.azure.core.util.Context;
-
/** Samples for PriceSheet GetByBillingPeriod. */
public final class PriceSheetGetByBillingPeriodSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheetForBillingPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/PriceSheetForBillingPeriod.json
*/
/**
* Sample code: PriceSheetForBillingPeriod.
@@ -958,11 +1064,13 @@ public final class PriceSheetGetByBillingPeriodSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void priceSheetForBillingPeriod(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.priceSheets().getByBillingPeriodWithResponse("201801", null, null, null, Context.NONE);
+ manager
+ .priceSheets()
+ .getByBillingPeriodWithResponse("201801", null, null, null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheetExpand.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/PriceSheetExpand.json
*/
/**
* Sample code: PriceSheetExpand.
@@ -970,7 +1078,9 @@ public final class PriceSheetGetByBillingPeriodSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void priceSheetExpand(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.priceSheets().getByBillingPeriodWithResponse("201801", "meterDetails", null, null, Context.NONE);
+ manager
+ .priceSheets()
+ .getByBillingPeriodWithResponse("201801", "meterDetails", null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -978,14 +1088,14 @@ public final class PriceSheetGetByBillingPeriodSamples {
### ReservationRecommendationDetails_Get
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.models.LookBackPeriod;
+import com.azure.resourcemanager.consumption.models.Scope;
import com.azure.resourcemanager.consumption.models.Term;
/** Samples for ReservationRecommendationDetails Get. */
public final class ReservationRecommendationDetailsGetSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsBySubscription.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationDetailsBySubscription.json
*/
/**
* Sample code: ReservationRecommendationsBySubscription-Legacy.
@@ -996,11 +1106,19 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
- .getWithResponse("Single", "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", Context.NONE);
+ .getWithResponse(
+ "subscriptions/00000000-0000-0000-0000-00000000",
+ Scope.SINGLE,
+ "westus",
+ Term.P3Y,
+ LookBackPeriod.LAST30DAYS,
+ "Standard_DS13_v2",
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByBillingProfile.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationDetailsByBillingProfile.json
*/
/**
* Sample code: ReservationRecommendationsByBillingProfile-Modern.
@@ -1012,11 +1130,18 @@ public final class ReservationRecommendationDetailsGetSamples {
manager
.reservationRecommendationDetails()
.getWithResponse(
- "Shared", "australiaeast", Term.P1Y, LookBackPeriod.LAST7DAYS, "Standard_B2s", Context.NONE);
+ "providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-00000000:00000000-0000-0000-0000-00000000/billingProfiles/00000000-0000-0000-0000-00000000",
+ Scope.SHARED,
+ "australiaeast",
+ Term.P1Y,
+ LookBackPeriod.LAST7DAYS,
+ "Standard_B2s",
+ "properties/subscriptionId eq 00000000-0000-0000-0000-00000000",
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByResourceGroup.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationDetailsByResourceGroup.json
*/
/**
* Sample code: ReservationRecommendationsByResourceGroup-Legacy.
@@ -1027,11 +1152,19 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
- .getWithResponse("Single", "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", Context.NONE);
+ .getWithResponse(
+ "subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/testGroup",
+ Scope.SINGLE,
+ "westus",
+ Term.P3Y,
+ LookBackPeriod.LAST30DAYS,
+ "Standard_DS13_v2",
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByBillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationDetailsByBillingAccount.json
*/
/**
* Sample code: ReservationRecommendationsByBillingAccount-Legacy.
@@ -1042,7 +1175,15 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
- .getWithResponse("Shared", "eastus", Term.P1Y, LookBackPeriod.LAST60DAYS, "Standard_DS14_v2", Context.NONE);
+ .getWithResponse(
+ "providers/Microsoft.Billing/billingAccounts/00000000",
+ Scope.SHARED,
+ "eastus",
+ Term.P1Y,
+ LookBackPeriod.LAST60DAYS,
+ "Standard_DS14_v2",
+ "properties/subscriptionId eq 00000000-0000-0000-0000-00000000",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1050,12 +1191,10 @@ public final class ReservationRecommendationDetailsGetSamples {
### ReservationRecommendations_List
```java
-import com.azure.core.util.Context;
-
/** Samples for ReservationRecommendations List. */
public final class ReservationRecommendationsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsBySubscription.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationsBySubscription.json
*/
/**
* Sample code: ReservationRecommendationsBySubscription-Legacy.
@@ -1066,11 +1205,11 @@ public final class ReservationRecommendationsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendations()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, Context.NONE);
+ .list("subscriptions/00000000-0000-0000-0000-000000000000", null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByBillingProfile.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationsByBillingProfile.json
*/
/**
* Sample code: ReservationRecommendationsByBillingProfile-Modern.
@@ -1081,11 +1220,14 @@ public final class ReservationRecommendationsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendations()
- .list("providers/Microsoft.Billing/billingAccounts/123456/billingProfiles/6420", null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/123456/billingProfiles/6420",
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByResourceGroup.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationsByResourceGroup.json
*/
/**
* Sample code: ReservationRecommendationsByResourceGroup-Legacy.
@@ -1096,11 +1238,14 @@ public final class ReservationRecommendationsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendations()
- .list("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup", null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup",
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json
*/
/**
* Sample code: ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod-Legacy.
@@ -1114,11 +1259,11 @@ public final class ReservationRecommendationsListSamples {
.list(
"subscriptions/00000000-0000-0000-0000-000000000000",
"properties/scope eq 'Single' AND properties/lookBackPeriod eq 'Last7Days'",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByBillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationRecommendationsByBillingAccount.json
*/
/**
* Sample code: ReservationRecommendationsByBillingAccount-Legacy.
@@ -1129,7 +1274,7 @@ public final class ReservationRecommendationsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendations()
- .list("providers/Microsoft.Billing/billingAccounts/123456", null, Context.NONE);
+ .list("providers/Microsoft.Billing/billingAccounts/123456", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -1137,12 +1282,12 @@ public final class ReservationRecommendationsListSamples {
### ReservationTransactions_List
```java
-import com.azure.core.util.Context;
+import java.math.BigDecimal;
/** Samples for ReservationTransactions List. */
public final class ReservationTransactionsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationTransactionsListByEnrollmentNumber.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationTransactionsListByEnrollmentNumber.json
*/
/**
* Sample code: ReservationTransactionsByEnrollmentNumber.
@@ -1153,7 +1298,12 @@ public final class ReservationTransactionsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationTransactions()
- .list("123456", "properties/eventDate ge 2020-05-20 AND properties/eventDate le 2020-05-30", Context.NONE);
+ .list(
+ "123456",
+ "properties/eventDate ge 2020-05-20 AND properties/eventDate le 2020-05-30",
+ true,
+ new BigDecimal("15.5"),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1161,12 +1311,10 @@ public final class ReservationTransactionsListSamples {
### ReservationTransactions_ListByBillingProfile
```java
-import com.azure.core.util.Context;
-
/** Samples for ReservationTransactions ListByBillingProfile. */
public final class ReservationTransactionsListByBillingProfileSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationTransactionsListByBillingProfileId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationTransactionsListByBillingProfileId.json
*/
/**
* Sample code: ReservationTransactionsByBillingProfileId.
@@ -1181,7 +1329,7 @@ public final class ReservationTransactionsListByBillingProfileSamples {
"fcebaabc-fced-4284-a83d-79f83dee183c:45796ba8-988f-45ad-bea9-7b71fc6c7513_2018-09-30",
"Z76D-SGAF-BG7-TGB",
"properties/eventDate ge 2020-05-20 AND properties/eventDate le 2020-05-30",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1189,12 +1337,10 @@ public final class ReservationTransactionsListByBillingProfileSamples {
### ReservationsDetails_List
```java
-import com.azure.core.util.Context;
-
/** Samples for ReservationsDetails List. */
public final class ReservationsDetailsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingProfileIdReservationId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationDetailsByBillingProfileIdReservationId.json
*/
/**
* Sample code: ReservationDetailsByBillingProfileIdReservationId.
@@ -1212,11 +1358,11 @@ public final class ReservationsDetailsListSamples {
null,
"1c6b6358-709f-484c-85f1-72e862a0cf3b",
"9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingAccountId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationDetailsByBillingAccountId.json
*/
/**
* Sample code: ReservationDetailsByBillingAccountId.
@@ -1234,11 +1380,11 @@ public final class ReservationsDetailsListSamples {
"properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-12-05",
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingProfileId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationDetailsByBillingProfileId.json
*/
/**
* Sample code: ReservationDetailsByBillingProfileId.
@@ -1256,7 +1402,7 @@ public final class ReservationsDetailsListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1264,12 +1410,10 @@ public final class ReservationsDetailsListSamples {
### ReservationsDetails_ListByReservationOrder
```java
-import com.azure.core.util.Context;
-
/** Samples for ReservationsDetails ListByReservationOrder. */
public final class ReservationsDetailsListByReservationOrderSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetails.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationDetails.json
*/
/**
* Sample code: ReservationDetails.
@@ -1282,7 +1426,7 @@ public final class ReservationsDetailsListByReservationOrderSamples {
.listByReservationOrder(
"00000000-0000-0000-0000-000000000000",
"properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-12-05",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1290,12 +1434,10 @@ public final class ReservationsDetailsListByReservationOrderSamples {
### ReservationsDetails_ListByReservationOrderAndReservation
```java
-import com.azure.core.util.Context;
-
/** Samples for ReservationsDetails ListByReservationOrderAndReservation. */
public final class ReservationsDetailsListByReservationOrderAndReservationSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsWithReservationId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationDetailsWithReservationId.json
*/
/**
* Sample code: ReservationDetailsWithReservationId.
@@ -1310,7 +1452,7 @@ public final class ReservationsDetailsListByReservationOrderAndReservationSample
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000000",
"properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-12-05",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1318,13 +1460,12 @@ public final class ReservationsDetailsListByReservationOrderAndReservationSample
### ReservationsSummaries_List
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.models.Datagrain;
/** Samples for ReservationsSummaries List. */
public final class ReservationsSummariesListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithBillingAccountId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesDailyWithBillingAccountId.json
*/
/**
* Sample code: ReservationSummariesDailyWithBillingAccountId.
@@ -1343,11 +1484,11 @@ public final class ReservationsSummariesListSamples {
"properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20",
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithBillingProfileId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesDailyWithBillingProfileId.json
*/
/**
* Sample code: ReservationSummariesDailyWithBillingProfileId.
@@ -1366,11 +1507,11 @@ public final class ReservationsSummariesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingAccountId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesMonthlyWithBillingAccountId.json
*/
/**
* Sample code: ReservationSummariesMonthlyWithBillingAccountId.
@@ -1389,11 +1530,11 @@ public final class ReservationsSummariesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingProfileId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesMonthlyWithBillingProfileId.json
*/
/**
* Sample code: ReservationSummariesMonthlyWithBillingProfileId.
@@ -1412,11 +1553,11 @@ public final class ReservationsSummariesListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json
*/
/**
* Sample code: ReservationSummariesMonthlyWithBillingProfileIdReservationId.
@@ -1435,7 +1576,7 @@ public final class ReservationsSummariesListSamples {
null,
"1c6b6358-709f-484c-85f1-72e862a0cf3b",
"9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1443,13 +1584,12 @@ public final class ReservationsSummariesListSamples {
### ReservationsSummaries_ListByReservationOrder
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.models.Datagrain;
/** Samples for ReservationsSummaries ListByReservationOrder. */
public final class ReservationsSummariesListByReservationOrderSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthly.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesMonthly.json
*/
/**
* Sample code: ReservationSummariesMonthly.
@@ -1459,11 +1599,12 @@ public final class ReservationsSummariesListByReservationOrderSamples {
public static void reservationSummariesMonthly(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationsSummaries()
- .listByReservationOrder("00000000-0000-0000-0000-000000000000", Datagrain.MONTHLY, null, Context.NONE);
+ .listByReservationOrder(
+ "00000000-0000-0000-0000-000000000000", Datagrain.MONTHLY, null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDaily.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesDaily.json
*/
/**
* Sample code: ReservationSummariesDaily.
@@ -1477,7 +1618,7 @@ public final class ReservationsSummariesListByReservationOrderSamples {
"00000000-0000-0000-0000-000000000000",
Datagrain.DAILY,
"properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1485,13 +1626,12 @@ public final class ReservationsSummariesListByReservationOrderSamples {
### ReservationsSummaries_ListByReservationOrderAndReservation
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.models.Datagrain;
/** Samples for ReservationsSummaries ListByReservationOrderAndReservation. */
public final class ReservationsSummariesListByReservationOrderAndReservationSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithReservationId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesDailyWithReservationId.json
*/
/**
* Sample code: ReservationSummariesDailyWithReservationId.
@@ -1507,11 +1647,11 @@ public final class ReservationsSummariesListByReservationOrderAndReservationSamp
"00000000-0000-0000-0000-000000000000",
Datagrain.DAILY,
"properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithReservationId.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/ReservationSummariesMonthlyWithReservationId.json
*/
/**
* Sample code: ReservationSummariesMonthlyWithReservationId.
@@ -1527,7 +1667,7 @@ public final class ReservationsSummariesListByReservationOrderAndReservationSamp
"00000000-0000-0000-0000-000000000000",
Datagrain.MONTHLY,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1535,12 +1675,10 @@ public final class ReservationsSummariesListByReservationOrderAndReservationSamp
### Tags_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Tags Get. */
public final class TagsGetSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Tags.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/Tags.json
*/
/**
* Sample code: Tags_Get.
@@ -1548,7 +1686,10 @@ public final class TagsGetSamples {
* @param manager Entry point to ConsumptionManager.
*/
public static void tagsGet(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
- manager.tags().getWithResponse("providers/Microsoft.CostManagement/billingAccounts/1234", Context.NONE);
+ manager
+ .tags()
+ .getWithResponse(
+ "providers/Microsoft.CostManagement/billingAccounts/1234", com.azure.core.util.Context.NONE);
}
}
```
@@ -1556,13 +1697,12 @@ public final class TagsGetSamples {
### UsageDetails_List
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.models.Metrictype;
/** Samples for UsageDetails List. */
public final class UsageDetailsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByBillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListForBillingPeriodByBillingAccount.json
*/
/**
* Sample code: BillingAccountUsageDetailsListForBillingPeriod-Legacy.
@@ -1573,11 +1713,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("providers/Microsoft.Billing/BillingAccounts/1234", null, null, null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/BillingAccounts/1234",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCAInvoiceSection.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByMCAInvoiceSection.json
*/
/**
* Sample code: InvoiceSectionUsageDetailsList-Modern.
@@ -1595,11 +1742,11 @@ public final class UsageDetailsListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsList.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsList.json
*/
/**
* Sample code: UsageDetailsList-Legacy.
@@ -1609,11 +1756,18 @@ public final class UsageDetailsListSamples {
public static void usageDetailsListLegacy(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListFilterByTag.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListFilterByTag.json
*/
/**
* Sample code: UsageDetailsListFilterByTag-Legacy.
@@ -1631,11 +1785,11 @@ public final class UsageDetailsListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByBillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByBillingAccount.json
*/
/**
* Sample code: BillingAccountUsageDetailsList-Legacy.
@@ -1646,11 +1800,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("providers/Microsoft.Billing/BillingAccounts/1234", null, null, null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/BillingAccounts/1234",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCABillingProfile.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByMCABillingProfile.json
*/
/**
* Sample code: BillingProfileUsageDetailsList-Modern.
@@ -1668,11 +1829,11 @@ public final class UsageDetailsListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByDepartment.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListForBillingPeriodByDepartment.json
*/
/**
* Sample code: DepartmentUsageDetailsListForBillingPeriod-Legacy.
@@ -1683,11 +1844,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("providers/Microsoft.Billing/Departments/1234", null, null, null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/Departments/1234",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByManagementGroup.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListForBillingPeriodByManagementGroup.json
*/
/**
* Sample code: ManagementGroupUsageDetailsListForBillingPeriod-Legacy.
@@ -1698,11 +1866,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricAmortizedCost.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByMetricAmortizedCost.json
*/
/**
* Sample code: UsageDetailsListByMetricAmortizedCost-Legacy.
@@ -1720,11 +1895,11 @@ public final class UsageDetailsListSamples {
null,
null,
Metrictype.AMORTIZEDCOST,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricUsage.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByMetricUsage.json
*/
/**
* Sample code: UsageDetailsListByMetricUsage-Legacy.
@@ -1742,11 +1917,11 @@ public final class UsageDetailsListSamples {
null,
null,
Metrictype.USAGE,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByManagementGroup.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByManagementGroup.json
*/
/**
* Sample code: ManagementGroupUsageDetailsList-Legacy.
@@ -1757,11 +1932,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByDepartment.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByDepartment.json
*/
/**
* Sample code: DepartmentUsageDetailsList-Legacy.
@@ -1772,11 +1954,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("providers/Microsoft.Billing/Departments/1234", null, null, null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/Departments/1234",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricActualCost.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByMetricActualCost.json
*/
/**
* Sample code: UsageDetailsListByMetricActualCost-Legacy.
@@ -1794,11 +1983,11 @@ public final class UsageDetailsListSamples {
null,
null,
Metrictype.ACTUALCOST,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByEnrollmentAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByEnrollmentAccount.json
*/
/**
* Sample code: EnrollmentAccountUsageDetailsList-Legacy.
@@ -1809,11 +1998,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("providers/Microsoft.Billing/EnrollmentAccounts/1234", null, null, null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/EnrollmentAccounts/1234",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCABillingAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByMCABillingAccount.json
*/
/**
* Sample code: BillingAccountUsageDetailsList-Modern.
@@ -1824,11 +2020,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("providers/Microsoft.Billing/BillingAccounts/1234:56789", null, null, null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/BillingAccounts/1234:56789",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCACustomer.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListByMCACustomer.json
*/
/**
* Sample code: CustomerUsageDetailsList-Modern.
@@ -1846,11 +2049,11 @@ public final class UsageDetailsListSamples {
null,
null,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsExpand.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsExpand.json
*/
/**
* Sample code: UsageDetailsExpand-Legacy.
@@ -1867,11 +2070,11 @@ public final class UsageDetailsListSamples {
null,
1,
null,
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json
*/
/**
* Sample code: EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy.
@@ -1882,11 +2085,18 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("providers/Microsoft.Billing/EnrollmentAccounts/1234", null, null, null, null, null, Context.NONE);
+ .list(
+ "providers/Microsoft.Billing/EnrollmentAccounts/1234",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriod.json
+ * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/examples/UsageDetailsListForBillingPeriod.json
*/
/**
* Sample code: UsageDetailsListForBillingPeriod-Legacy.
@@ -1897,7 +2107,14 @@ public final class UsageDetailsListSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.usageDetails()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, null, Context.NONE);
+ .list(
+ "subscriptions/00000000-0000-0000-0000-000000000000",
+ null,
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
}
```
diff --git a/sdk/consumption/azure-resourcemanager-consumption/pom.xml b/sdk/consumption/azure-resourcemanager-consumption/pom.xml
index 2eadadb35f5e5..969237f3164ea 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/pom.xml
+++ b/sdk/consumption/azure-resourcemanager-consumption/pom.xml
@@ -1,3 +1,8 @@
+
4.0.0
@@ -13,7 +18,7 @@
jarMicrosoft Azure SDK for Consumption Management
- This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10.
+ This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2023-05.https://github.com/Azure/azure-sdk-for-java
@@ -38,7 +43,8 @@
UTF-8
- true
+ 0
+ 0
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
index fba2874342776..8812df1bfd841 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -130,6 +132,19 @@ public static ConsumptionManager authenticate(TokenCredential credential, AzureP
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of Consumption service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the Consumption service API instance.
+ */
+ public static ConsumptionManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new ConsumptionManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create ConsumptionManager with optional configuration.
*
@@ -141,13 +156,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -208,6 +224,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -215,9 +244,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -239,7 +270,7 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.consumption")
.append("/")
- .append("1.0.0-beta.3");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -257,10 +288,15 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -291,7 +327,11 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
}
}
- /** @return Resource collection API of UsageDetails. */
+ /**
+ * Gets the resource collection API of UsageDetails.
+ *
+ * @return Resource collection API of UsageDetails.
+ */
public UsageDetails usageDetails() {
if (this.usageDetails == null) {
this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this);
@@ -299,7 +339,11 @@ public UsageDetails usageDetails() {
return usageDetails;
}
- /** @return Resource collection API of Marketplaces. */
+ /**
+ * Gets the resource collection API of Marketplaces.
+ *
+ * @return Resource collection API of Marketplaces.
+ */
public Marketplaces marketplaces() {
if (this.marketplaces == null) {
this.marketplaces = new MarketplacesImpl(clientObject.getMarketplaces(), this);
@@ -307,7 +351,11 @@ public Marketplaces marketplaces() {
return marketplaces;
}
- /** @return Resource collection API of Budgets. */
+ /**
+ * 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);
@@ -315,7 +363,11 @@ public Budgets budgets() {
return budgets;
}
- /** @return Resource collection API of Tags. */
+ /**
+ * Gets the resource collection API of Tags.
+ *
+ * @return Resource collection API of Tags.
+ */
public Tags tags() {
if (this.tags == null) {
this.tags = new TagsImpl(clientObject.getTags(), this);
@@ -323,7 +375,11 @@ public Tags tags() {
return tags;
}
- /** @return Resource collection API of Charges. */
+ /**
+ * Gets the resource collection API of Charges.
+ *
+ * @return Resource collection API of Charges.
+ */
public Charges charges() {
if (this.charges == null) {
this.charges = new ChargesImpl(clientObject.getCharges(), this);
@@ -331,7 +387,11 @@ public Charges charges() {
return charges;
}
- /** @return Resource collection API of Balances. */
+ /**
+ * Gets the resource collection API of Balances.
+ *
+ * @return Resource collection API of Balances.
+ */
public Balances balances() {
if (this.balances == null) {
this.balances = new BalancesImpl(clientObject.getBalances(), this);
@@ -339,7 +399,11 @@ public Balances balances() {
return balances;
}
- /** @return Resource collection API of ReservationsSummaries. */
+ /**
+ * Gets the resource collection API of ReservationsSummaries.
+ *
+ * @return Resource collection API of ReservationsSummaries.
+ */
public ReservationsSummaries reservationsSummaries() {
if (this.reservationsSummaries == null) {
this.reservationsSummaries = new ReservationsSummariesImpl(clientObject.getReservationsSummaries(), this);
@@ -347,7 +411,11 @@ public ReservationsSummaries reservationsSummaries() {
return reservationsSummaries;
}
- /** @return Resource collection API of ReservationsDetails. */
+ /**
+ * Gets the resource collection API of ReservationsDetails.
+ *
+ * @return Resource collection API of ReservationsDetails.
+ */
public ReservationsDetails reservationsDetails() {
if (this.reservationsDetails == null) {
this.reservationsDetails = new ReservationsDetailsImpl(clientObject.getReservationsDetails(), this);
@@ -355,7 +423,11 @@ public ReservationsDetails reservationsDetails() {
return reservationsDetails;
}
- /** @return Resource collection API of ReservationRecommendations. */
+ /**
+ * Gets the resource collection API of ReservationRecommendations.
+ *
+ * @return Resource collection API of ReservationRecommendations.
+ */
public ReservationRecommendations reservationRecommendations() {
if (this.reservationRecommendations == null) {
this.reservationRecommendations =
@@ -364,7 +436,11 @@ public ReservationRecommendations reservationRecommendations() {
return reservationRecommendations;
}
- /** @return Resource collection API of ReservationRecommendationDetails. */
+ /**
+ * Gets the resource collection API of ReservationRecommendationDetails.
+ *
+ * @return Resource collection API of ReservationRecommendationDetails.
+ */
public ReservationRecommendationDetails reservationRecommendationDetails() {
if (this.reservationRecommendationDetails == null) {
this.reservationRecommendationDetails =
@@ -373,7 +449,11 @@ public ReservationRecommendationDetails reservationRecommendationDetails() {
return reservationRecommendationDetails;
}
- /** @return Resource collection API of ReservationTransactions. */
+ /**
+ * Gets the resource collection API of ReservationTransactions.
+ *
+ * @return Resource collection API of ReservationTransactions.
+ */
public ReservationTransactions reservationTransactions() {
if (this.reservationTransactions == null) {
this.reservationTransactions =
@@ -382,7 +462,11 @@ public ReservationTransactions reservationTransactions() {
return reservationTransactions;
}
- /** @return Resource collection API of PriceSheets. */
+ /**
+ * Gets the resource collection API of PriceSheets.
+ *
+ * @return Resource collection API of PriceSheets.
+ */
public PriceSheets priceSheets() {
if (this.priceSheets == null) {
this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
@@ -390,7 +474,11 @@ public PriceSheets priceSheets() {
return priceSheets;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -398,7 +486,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of AggregatedCosts. */
+ /**
+ * Gets the resource collection API of AggregatedCosts.
+ *
+ * @return Resource collection API of AggregatedCosts.
+ */
public AggregatedCosts aggregatedCosts() {
if (this.aggregatedCosts == null) {
this.aggregatedCosts = new AggregatedCostsImpl(clientObject.getAggregatedCosts(), this);
@@ -406,7 +498,11 @@ public AggregatedCosts aggregatedCosts() {
return aggregatedCosts;
}
- /** @return Resource collection API of EventsOperations. */
+ /**
+ * Gets the resource collection API of EventsOperations.
+ *
+ * @return Resource collection API of EventsOperations.
+ */
public EventsOperations eventsOperations() {
if (this.eventsOperations == null) {
this.eventsOperations = new EventsOperationsImpl(clientObject.getEventsOperations(), this);
@@ -414,7 +510,11 @@ public EventsOperations eventsOperations() {
return eventsOperations;
}
- /** @return Resource collection API of LotsOperations. */
+ /**
+ * Gets the resource collection API of LotsOperations.
+ *
+ * @return Resource collection API of LotsOperations.
+ */
public LotsOperations lotsOperations() {
if (this.lotsOperations == null) {
this.lotsOperations = new LotsOperationsImpl(clientObject.getLotsOperations(), this);
@@ -422,7 +522,11 @@ public LotsOperations lotsOperations() {
return lotsOperations;
}
- /** @return Resource collection API of Credits. */
+ /**
+ * Gets the resource collection API of Credits.
+ *
+ * @return Resource collection API of Credits.
+ */
public Credits credits() {
if (this.credits == null) {
this.credits = new CreditsImpl(clientObject.getCredits(), this);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
index 813767044909a..30446c9fc6af1 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
@@ -16,57 +16,57 @@ public interface AggregatedCostsClient {
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
+ * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
+ * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
+ * or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param 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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId);
+ Response getByManagementGroupWithResponse(
+ String managementGroupId, String filter, Context context);
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
- * or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param 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 management group aggregated cost resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByManagementGroupWithResponse(
- String managementGroupId, String filter, Context context);
+ ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId);
/**
* Provides the aggregate cost of a management group and all child management groups by specified billing period.
*
* @param managementGroupId Azure Management Group ID.
* @param billingPeriodName Billing Period Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
- String managementGroupId, String billingPeriodName);
+ Response getForBillingPeriodByManagementGroupWithResponse(
+ String managementGroupId, String billingPeriodName, Context context);
/**
* Provides the aggregate cost of a management group and all child management groups by specified billing period.
*
* @param managementGroupId Azure Management Group ID.
* @param billingPeriodName Billing Period Name.
- * @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 management group aggregated cost resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getForBillingPeriodByManagementGroupWithResponse(
- String managementGroupId, String billingPeriodName, Context context);
+ ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
index e21a93426a857..a20eef23c506b 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
@@ -17,27 +17,27 @@ public interface BalancesClient {
* later.
*
* @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 balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- BalanceInner getByBillingAccount(String billingAccountId);
+ Response getByBillingAccountWithResponse(String billingAccountId, Context context);
/**
* Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or
* later.
*
* @param billingAccountId BillingAccount ID.
- * @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 balances for a scope by billingAccountId.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByBillingAccountWithResponse(String billingAccountId, Context context);
+ BalanceInner getByBillingAccount(String billingAccountId);
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
@@ -45,13 +45,15 @@ public interface BalancesClient {
*
* @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 balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName);
+ Response getForBillingPeriodByBillingAccountWithResponse(
+ String billingAccountId, String billingPeriodName, Context context);
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
@@ -59,13 +61,11 @@ public interface BalancesClient {
*
* @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 balances for a scope by billing period and billingAccountId.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getForBillingPeriodByBillingAccountWithResponse(
- String billingAccountId, String billingPeriodName, Context context);
+ BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
index 031ef9c557caf..3428003b380e4 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
@@ -26,12 +26,12 @@ public interface BudgetsClient {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope);
@@ -49,13 +49,13 @@ public interface BudgetsClient {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope, Context context);
@@ -73,16 +73,17 @@ public interface BudgetsClient {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the budget for the scope by budget name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- BudgetInner get(String scope, String budgetName);
+ Response getWithResponse(String scope, String budgetName, Context context);
/**
* Gets the budget for the scope by budget name.
@@ -97,17 +98,16 @@ public interface BudgetsClient {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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)
- Response getWithResponse(String scope, String budgetName, Context context);
+ 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
@@ -124,17 +124,19 @@ public interface BudgetsClient {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return a budget resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters);
+ 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
@@ -151,19 +153,17 @@ public interface BudgetsClient {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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)
- Response createOrUpdateWithResponse(
- String scope, String budgetName, BudgetInner parameters, Context context);
+ BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters);
/**
* The operation to delete a budget.
@@ -178,15 +178,17 @@ Response createOrUpdateWithResponse(
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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)
- void delete(String scope, String budgetName);
+ Response deleteWithResponse(String scope, String budgetName, Context context);
/**
* The operation to delete a budget.
@@ -201,15 +203,13 @@ Response createOrUpdateWithResponse(
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String scope, String budgetName, Context context);
+ void delete(String scope, String budgetName);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
index 58df00d67d608..da231af908224 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
@@ -27,17 +27,27 @@ public interface ChargesClient {
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
+ * @param startDate Start date.
+ * @param endDate End date.
+ * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
+ * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
+ * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
+ * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
+ * properties/invoiceSectionId.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 charge summary.
+ * @return result of listing charge summary along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ChargesListResultInner list(String scope);
+ Response listWithResponse(
+ String scope, String startDate, String endDate, String filter, String apply, Context context);
/**
* Lists the charges based for the defined scope.
@@ -54,25 +64,15 @@ public interface ChargesClient {
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
- * @param startDate Start date.
- * @param endDate End date.
- * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
- * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
- * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
- * properties/invoiceSectionId.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 charge summary.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listWithResponse(
- String scope, String startDate, String endDate, String filter, String apply, Context context);
+ ChargesListResultInner list(String scope);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java
index 4a9bba8b64c61..1c418d6b439b8 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java
@@ -17,25 +17,25 @@ public interface CreditsClient {
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile 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 a credit summary resource.
+ * @return a credit summary resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CreditSummaryInner get(String billingAccountId, String billingProfileId);
+ Response getWithResponse(String billingAccountId, String billingProfileId, Context context);
/**
* The credit summary by billingAccountId and billingProfileId.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile 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 a credit summary resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String billingAccountId, String billingProfileId, Context context);
+ CreditSummaryInner get(String billingAccountId, String billingProfileId);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
index 7591c8b7840b3..b9c7f11a7a63c 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
@@ -23,7 +23,7 @@ public interface EventsOperationsClient {
* @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 event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
@@ -41,7 +41,7 @@ PagedIterable listByBillingProfile(
* @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 event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
@@ -55,7 +55,7 @@ PagedIterable listByBillingProfile(
* @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 event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId);
@@ -72,7 +72,7 @@ PagedIterable listByBillingProfile(
* @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 event summary.
+ * @return result of listing event summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId, String filter, Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
index 6c7db7249652f..43d2f2092bcd9 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
@@ -13,22 +13,22 @@
/** An instance of this class provides access to all the operations defined in LotsOperationsClient. */
public interface LotsOperationsClient {
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft
+ * Customer Agreements (MCA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure 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.
- * @return result of listing lot summary.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(String billingAccountId, String billingProfileId);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft
+ * Customer Agreements (MCA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
@@ -36,28 +36,28 @@ public interface LotsOperationsClient {
* @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 lot summary.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
String billingAccountId, String billingProfileId, Context context);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported for Microsoft
+ * Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts.
*
* @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 result of listing lot summary.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId);
/**
- * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
- * Microsoft Azure consumption commitments are only supported for the billing account scope.
+ * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported for Microsoft
+ * Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts.
*
* @param billingAccountId BillingAccount ID.
* @param filter May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le',
@@ -67,8 +67,40 @@ PagedIterable listByBillingProfile(
* @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 lot summary.
+ * @return result of listing lot summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingAccount(String billingAccountId, String filter, Context context);
+
+ /**
+ * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing
+ * accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param customerId Customer 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 listing lot summary as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(String billingAccountId, String customerId);
+
+ /**
+ * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing
+ * accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param customerId Customer ID.
+ * @param filter May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le',
+ * 'ge', and 'and'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 lot summary as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCustomer(
+ String billingAccountId, String customerId, String filter, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
index 56f5b91e7340d..a6a9d0d633892 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
@@ -28,7 +28,7 @@ public interface MarketplacesClient {
* @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 marketplaces.
+ * @return result of listing marketplaces as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope);
@@ -57,7 +57,7 @@ public interface MarketplacesClient {
* @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 marketplaces.
+ * @return result of listing marketplaces as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope, String filter, Integer top, String skiptoken, Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
index d8528c9abbd37..2572135f1224c 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
@@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @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 consumption operations.
+ * @return result of listing consumption operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @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 consumption operations.
+ * @return result of listing consumption operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
index 083b16f7e65c5..047677b93c8bb 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
@@ -7,11 +7,32 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.consumption.fluent.models.OperationStatusInner;
import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultInner;
/** An instance of this class provides access to all the operations defined in PriceSheetsClient. */
public interface PriceSheetsClient {
+ /**
+ * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
+ *
+ * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields
+ * are not included when returning price sheet.
+ * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
+ * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
+ * specifies a starting point to use for subsequent calls.
+ * @param top May be used to limit the number of results to the top N results.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the price sheet for a subscription along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String expand, String skiptoken, Integer top, Context context);
+
/**
* Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
*
@@ -23,8 +44,10 @@ public interface PriceSheetsClient {
PriceSheetResultInner get();
/**
- * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
+ * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
+ * for May 1, 2014 or later.
*
+ * @param billingPeriodName Billing Period Name.
* @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields
* are not included when returning price sheet.
* @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
@@ -35,10 +58,11 @@ public interface PriceSheetsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the price sheet for a subscription.
+ * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String expand, String skiptoken, Integer top, Context context);
+ Response getByBillingPeriodWithResponse(
+ String billingPeriodName, String expand, String skiptoken, Integer top, Context context);
/**
* Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
@@ -54,23 +78,59 @@ public interface PriceSheetsClient {
PriceSheetResultInner getByBillingPeriod(String billingPeriodName);
/**
- * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
- * for May 1, 2014 or later.
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
*
+ * @param billingAccountId BillingAccount ID.
+ * @param billingPeriodName Billing Period Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationStatusInner> beginDownloadByBillingAccountPeriod(
+ String billingAccountId, String billingPeriodName);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
- * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields
- * are not included when returning price sheet.
- * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
- * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
- * specifies a starting point to use for subsequent calls.
- * @param top May be used to limit the number of results to the top N results.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the price sheet for a scope by subscriptionId and billing period.
+ * @return the {@link SyncPoller} for polling of the status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationStatusInner> beginDownloadByBillingAccountPeriod(
+ String billingAccountId, String billingPeriodName, Context context);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingPeriodName Billing Period Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of the long running operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByBillingPeriodWithResponse(
- String billingPeriodName, String expand, String skiptoken, Integer top, Context context);
+ OperationStatusInner downloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingPeriodName Billing Period Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner downloadByBillingAccountPeriod(
+ String billingAccountId, String billingPeriodName, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
index 042ad2b40fdd1..bfab00dc8ea9a 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
@@ -10,6 +10,7 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ReservationRecommendationDetailsModelInner;
import com.azure.resourcemanager.consumption.models.LookBackPeriod;
+import com.azure.resourcemanager.consumption.models.Scope;
import com.azure.resourcemanager.consumption.models.Term;
/**
@@ -19,47 +20,58 @@ public interface ReservationRecommendationDetailsClient {
/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
*
- * @param scope The scope associated with reservation recommendation details operations. This includes
+ * @param resourceScope The scope associated with reservation recommendation details operations. This includes
* '/subscriptions/{subscriptionId}/' for subscription scope,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
* /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope.
+ * @param scope Scope of the reservation.
* @param region Used to select the region the recommendation should be generated for.
* @param term Specify length of reservation recommendation term.
* @param lookBackPeriod Filter the time period on which reservation recommendation results are based.
* @param product Filter the products for which reservation recommendation results are generated. Examples:
* Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks).
+ * @param filter Used to filter reservation recommendation details by: properties/subscriptionId can be specified
+ * for billing account and billing profile paths.
+ * @param 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 reservation recommendation details.
+ * @return reservation recommendation details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ReservationRecommendationDetailsModelInner get(
- String scope, String region, Term term, LookBackPeriod lookBackPeriod, String product);
+ Response getWithResponse(
+ String resourceScope,
+ Scope scope,
+ String region,
+ Term term,
+ LookBackPeriod lookBackPeriod,
+ String product,
+ String filter,
+ Context context);
/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
*
- * @param scope The scope associated with reservation recommendation details operations. This includes
+ * @param resourceScope The scope associated with reservation recommendation details operations. This includes
* '/subscriptions/{subscriptionId}/' for subscription scope,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
* /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope.
+ * @param scope Scope of the reservation.
* @param region Used to select the region the recommendation should be generated for.
* @param term Specify length of reservation recommendation term.
* @param lookBackPeriod Filter the time period on which reservation recommendation results are based.
* @param product Filter the products for which reservation recommendation results are generated. Examples:
* Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks).
- * @param 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 reservation recommendation details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String scope, String region, Term term, LookBackPeriod lookBackPeriod, String product, Context context);
+ ReservationRecommendationDetailsModelInner get(
+ String resourceScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
index c713f5d4d2771..2cdb16d222eae 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
@@ -15,7 +15,7 @@ public interface ReservationRecommendationsClient {
/**
* List of recommendations for purchasing reserved instances.
*
- * @param scope The scope associated with reservation recommendations operations. This includes
+ * @param resourceScope The scope associated with reservation recommendations operations. This includes
* '/subscriptions/{subscriptionId}/' for subscription scope,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
@@ -24,15 +24,15 @@ public interface ReservationRecommendationsClient {
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope);
+ PagedIterable list(String resourceScope);
/**
* List of recommendations for purchasing reserved instances.
*
- * @param scope The scope associated with reservation recommendations operations. This includes
+ * @param resourceScope The scope associated with reservation recommendations operations. This includes
* '/subscriptions/{subscriptionId}/' for subscription scope,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
@@ -48,8 +48,8 @@ public interface ReservationRecommendationsClient {
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope, String filter, Context context);
+ PagedIterable list(String resourceScope, String filter, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
index 3d45b967b6e36..1cf9b761baabf 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
@@ -10,62 +10,91 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ModernReservationTransactionInner;
import com.azure.resourcemanager.consumption.fluent.models.ReservationTransactionInner;
+import java.math.BigDecimal;
/** An instance of this class provides access to all the operations defined in ReservationTransactionsClient. */
public interface ReservationTransactionsClient {
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted
+ * along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in
+ * May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
*
* @param billingAccountId BillingAccount ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String billingAccountId);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted
+ * along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in
+ * May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
*
* @param billingAccountId BillingAccount ID.
* @param filter Filter reservation transactions by date range. The properties/EventDate for start date and end
- * date. The filter supports 'le' and 'ge'.
+ * date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's
+ * billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29
+ * will include data for the entire December 2020 month (i.e. will contain records for dates December 30 and
+ * 31).
+ * @param useMarkupIfPartner Applies mark up to the transactions if the caller is a partner.
+ * @param previewMarkupPercentage Preview markup percentage to be applied.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String billingAccountId, String filter, Context context);
+ PagedIterable list(
+ String billingAccountId,
+ String filter,
+ Boolean useMarkupIfPartner,
+ BigDecimal previewMarkupPercentage,
+ Context context);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing profile scope. The refund transactions are posted along
+ * with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May
+ * 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
String billingAccountId, String billingProfileId);
/**
- * List of transactions for reserved instances on billing account scope.
+ * List of transactions for reserved instances on billing profile scope. The refund transactions are posted along
+ * with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May
+ * 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
+ * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @param filter Filter reservation transactions by date range. The properties/EventDate for start date and end
- * date. The filter supports 'le' and 'ge'.
+ * date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's
+ * billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29
+ * will include data for entire December 2020 month (i.e. will contain records for dates December 30 and 31).
* @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 reservation recommendations.
+ * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByBillingProfile(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
index 2ffbf884bf393..b7bee6fe6ffd7 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
@@ -13,7 +13,11 @@
/** An instance of this class provides access to all the operations defined in ReservationsDetailsClient. */
public interface ReservationsDetailsClient {
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
* @param reservationOrderId Order Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
@@ -21,13 +25,17 @@ public interface ReservationsDetailsClient {
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(String reservationOrderId, String filter);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
* @param reservationOrderId Order Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
@@ -36,14 +44,18 @@ public interface ReservationsDetailsClient {
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(
String reservationOrderId, String filter, Context context);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -52,14 +64,18 @@ PagedIterable listByReservationOrder(
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, String filter);
/**
- * Lists the reservations details for provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -69,31 +85,39 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, String filter, Context context);
/**
- * Lists the reservations details for the defined scope and provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
- * @param scope The scope associated with reservations details operations. This includes
+ * @param resourceScope The scope associated with reservations details operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope);
+ PagedIterable list(String resourceScope);
/**
- * Lists the reservations details for the defined scope and provided date range.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
- * @param scope The scope associated with reservations details operations. This includes
+ * @param resourceScope The scope associated with reservations details operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -109,11 +133,11 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation details.
+ * @return result of listing reservation details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String scope,
+ String resourceScope,
String startDate,
String endDate,
String filter,
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
index 40be069d1339d..31216e5c888e0 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
@@ -14,20 +14,24 @@
/** An instance of this class provides access to all the operations defined in ReservationsSummariesClient. */
public interface ReservationsSummariesClient {
/**
- * Lists the reservations summaries for daily or monthly grain.
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made
+ * with smaller date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param grain Can be daily or monthly.
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain);
/**
- * Lists the reservations summaries for daily or monthly grain.
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made
+ * with smaller date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param grain Can be daily or monthly.
@@ -37,14 +41,16 @@ public interface ReservationsSummariesClient {
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrder(
String reservationOrderId, Datagrain grain, String filter, Context context);
/**
- * Lists the reservations summaries for daily or monthly grain.
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made
+ * with smaller date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -52,14 +58,16 @@ PagedIterable listByReservationOrder(
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, Datagrain grain);
/**
- * Lists the reservations summaries for daily or monthly grain.
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made
+ * with smaller date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -70,16 +78,18 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, Datagrain grain, String filter, Context context);
/**
- * Lists the reservations summaries for the defined scope daily or monthly grain.
+ * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
*
- * @param scope The scope associated with reservations summaries operations. This includes
+ * @param resourceScope The scope associated with reservations summaries operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -87,15 +97,17 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope, Datagrain grain);
+ PagedIterable list(String resourceScope, Datagrain grain);
/**
- * Lists the reservations summaries for the defined scope daily or monthly grain.
+ * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
*
- * @param scope The scope associated with reservations summaries operations. This includes
+ * @param resourceScope The scope associated with reservations summaries operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* BillingProfile scope (modern).
@@ -112,11 +124,11 @@ PagedIterable listByReservationOrderAndReservation(
* @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 reservation summaries.
+ * @return result of listing reservation summaries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String scope,
+ String resourceScope,
Datagrain grain,
String startDate,
String endDate,
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
index 2266b2caca8cc..d3193b9e18aaf 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
@@ -23,13 +23,14 @@ public interface TagsClient {
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
* for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
* Management Group 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 all available tag keys for the defined scope.
+ * @return all available tag keys for the defined scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- TagsResultInner get(String scope);
+ Response getWithResponse(String scope, Context context);
/**
* Get all available tag keys for the defined scope.
@@ -42,12 +43,11 @@ public interface TagsClient {
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
* for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
* Management Group 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 all available tag keys for the defined scope.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String scope, Context context);
+ TagsResultInner get(String scope);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
index e89c21afee289..d0f302be75b9b 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
@@ -17,6 +17,12 @@ public interface UsageDetailsClient {
* Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
* later.
*
+ *
**Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not
+ * recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify
+ * customers once a date for retirement has been determined.For Learn more,see [Generate Cost Details Report -
+ * Create
+ * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)**.
+ *
* @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
* for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
* scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
@@ -30,14 +36,14 @@ public interface UsageDetailsClient {
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/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 usage details.
+ * @return result of listing usage details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String scope);
@@ -46,6 +52,12 @@ public interface UsageDetailsClient {
* Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
* later.
*
+ *
**Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not
+ * recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify
+ * customers once a date for retirement has been determined.For Learn more,see [Generate Cost Details Report -
+ * Create
+ * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)**.
+ *
* @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
* for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
* scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
@@ -59,9 +71,9 @@ public interface UsageDetailsClient {
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @param expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of
* usage details. By default, these fields are not included when listing usage details.
@@ -79,7 +91,7 @@ public interface UsageDetailsClient {
* @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 usage details.
+ * @return result of listing usage details as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
index be4d23435c3bf..8775cba2ace84 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
@@ -6,11 +6,9 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.BalancePropertiesAdjustmentDetailsItem;
import com.azure.resourcemanager.consumption.models.BalancePropertiesNewPurchasesDetailsItem;
import com.azure.resourcemanager.consumption.models.BillingFrequency;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -20,8 +18,6 @@
/** A balance resource. */
@Fluent
public final class BalanceInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BalanceInner.class);
-
/*
* The properties of the balance.
*/
@@ -41,6 +37,10 @@ public final class BalanceInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of BalanceInner class. */
+ public BalanceInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the balance.
*
@@ -200,6 +200,15 @@ public Boolean priceHidden() {
return this.innerProperties() == null ? null : this.innerProperties().priceHidden();
}
+ /**
+ * Get the overageRefund property: Overage Refunds.
+ *
+ * @return the overageRefund value.
+ */
+ public BigDecimal overageRefund() {
+ return this.innerProperties() == null ? null : this.innerProperties().overageRefund();
+ }
+
/**
* Get the newPurchasesDetails property: List of new purchases.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
index f0e15ad53cf24..a84290ad9a7d9 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
@@ -5,11 +5,9 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.BalancePropertiesAdjustmentDetailsItem;
import com.azure.resourcemanager.consumption.models.BalancePropertiesNewPurchasesDetailsItem;
import com.azure.resourcemanager.consumption.models.BillingFrequency;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.util.List;
@@ -17,8 +15,6 @@
/** The properties of the balance. */
@Fluent
public final class BalanceProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BalanceProperties.class);
-
/*
* The ISO currency in which the meter is charged, for example, USD.
*/
@@ -32,8 +28,7 @@ public final class BalanceProperties {
private BigDecimal beginningBalance;
/*
- * The ending balance for the billing period (for open periods this will be
- * updated daily).
+ * The ending balance for the billing period (for open periods this will be updated daily).
*/
@JsonProperty(value = "endingBalance", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal endingBalance;
@@ -98,6 +93,12 @@ public final class BalanceProperties {
@JsonProperty(value = "priceHidden", access = JsonProperty.Access.WRITE_ONLY)
private Boolean priceHidden;
+ /*
+ * Overage Refunds
+ */
+ @JsonProperty(value = "overageRefund", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal overageRefund;
+
/*
* List of new purchases.
*/
@@ -110,6 +111,10 @@ public final class BalanceProperties {
@JsonProperty(value = "adjustmentDetails", access = JsonProperty.Access.WRITE_ONLY)
private List adjustmentDetails;
+ /** Creates an instance of BalanceProperties class. */
+ public BalanceProperties() {
+ }
+
/**
* Get the currency property: The ISO currency in which the meter is charged, for example, USD.
*
@@ -239,6 +244,15 @@ public Boolean priceHidden() {
return this.priceHidden;
}
+ /**
+ * Get the overageRefund property: Overage Refunds.
+ *
+ * @return the overageRefund value.
+ */
+ public BigDecimal overageRefund() {
+ return this.overageRefund;
+ }
+
/**
* Get the newPurchasesDetails property: List of new purchases.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
index f8fea1a4e18b1..61217c1746377 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.BudgetFilter;
import com.azure.resourcemanager.consumption.models.BudgetTimePeriod;
import com.azure.resourcemanager.consumption.models.CategoryType;
@@ -14,7 +13,6 @@
import com.azure.resourcemanager.consumption.models.ForecastSpend;
import com.azure.resourcemanager.consumption.models.Notification;
import com.azure.resourcemanager.consumption.models.TimeGrainType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.util.Map;
@@ -22,8 +20,6 @@
/** A budget resource. */
@Fluent
public final class BudgetInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetInner.class);
-
/*
* The properties of the budget.
*/
@@ -31,13 +27,16 @@ public final class BudgetInner extends ProxyResource {
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.
+ * 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.
*/
@JsonProperty(value = "eTag")
private String etag;
+ /** Creates an instance of BudgetInner class. */
+ public BudgetInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the budget.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
index ef8131acd2876..198e9d2956c7d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
@@ -13,7 +13,6 @@
import com.azure.resourcemanager.consumption.models.ForecastSpend;
import com.azure.resourcemanager.consumption.models.Notification;
import com.azure.resourcemanager.consumption.models.TimeGrainType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -22,8 +21,6 @@
/** The properties of the budget. */
@Fluent
public final class BudgetProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetProperties.class);
-
/*
* The category of the budget, whether the budget tracks cost or usage.
*/
@@ -37,19 +34,17 @@ public final class BudgetProperties {
private BigDecimal amount;
/*
- * The time covered by a budget. Tracking of the amount will be reset based
- * on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are
- * only supported by WD customers
+ * The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth,
+ * BillingQuarter, and BillingAnnual are only supported by WD customers
*/
@JsonProperty(value = "timeGrain", required = true)
private TimeGrainType timeGrain;
/*
- * Has start and end date of the budget. The start date must be first of
- * the month and should be less than the end date. Budget start date must
- * be on or after June 1, 2017. Future start date should not be more than
- * twelve months. Past start date should be selected within the timegrain
- * period. There are no restrictions on the end date.
+ * Has start and end date of the budget. The start date must be first of the month and should be less than the end
+ * date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve
+ * months. Past start date should be selected within the timegrain period. There are no restrictions on the end
+ * date.
*/
@JsonProperty(value = "timePeriod", required = true)
private BudgetTimePeriod timePeriod;
@@ -67,8 +62,7 @@ public final class BudgetProperties {
private CurrentSpend currentSpend;
/*
- * Dictionary of notifications associated with the budget. Budget can have
- * up to five notifications.
+ * Dictionary of notifications associated with the budget. Budget can have up to five notifications.
*/
@JsonProperty(value = "notifications")
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
@@ -80,6 +74,10 @@ public final class BudgetProperties {
@JsonProperty(value = "forecastSpend", access = JsonProperty.Access.WRITE_ONLY)
private ForecastSpend forecastSpend;
+ /** Creates an instance of BudgetProperties class. */
+ public BudgetProperties() {
+ }
+
/**
* Get the category property: The category of the budget, whether the budget tracks cost or usage.
*
@@ -235,22 +233,22 @@ public ForecastSpend forecastSpend() {
*/
public void validate() {
if (category() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property category in model BudgetProperties"));
}
if (amount() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property amount in model BudgetProperties"));
}
if (timeGrain() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property timeGrain in model BudgetProperties"));
}
if (timePeriod() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property timePeriod in model BudgetProperties"));
} else {
@@ -276,4 +274,6 @@ public void validate() {
forecastSpend().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(BudgetProperties.class);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
index 4675dd79f2cb1..6bf524f365f6d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
@@ -5,23 +5,23 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ChargeSummary;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Result of listing charge summary. */
@Immutable
public final class ChargesListResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ChargesListResultInner.class);
-
/*
* The list of charge summary
*/
@JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
+ /** Creates an instance of ChargesListResultInner class. */
+ public ChargesListResultInner() {
+ }
+
/**
* Get the value property: The list of charge summary.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
index 0ee648db2f115..e46cfe7f0749b 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
@@ -6,20 +6,14 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.CreditBalanceSummary;
import com.azure.resourcemanager.consumption.models.Reseller;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.Map;
/** A credit summary resource. */
@Fluent
public final class CreditSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryInner.class);
-
/*
* The properties of the credit summary.
*/
@@ -27,17 +21,15 @@ public final class CreditSummaryInner extends ProxyResource {
private CreditSummaryProperties innerProperties;
/*
- * The etag for the resource.
+ * eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the
+ * user is updating the latest version or not.
*/
- @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "eTag")
private String etag;
- /*
- * Resource tags.
- */
- @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map tags;
+ /** Creates an instance of CreditSummaryInner class. */
+ public CreditSummaryInner() {
+ }
/**
* Get the innerProperties property: The properties of the credit summary.
@@ -49,7 +41,8 @@ private CreditSummaryProperties innerProperties() {
}
/**
- * Get the etag property: The etag for the resource.
+ * Get the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
+ * determine whether the user is updating the latest version or not.
*
* @return the etag value.
*/
@@ -58,12 +51,15 @@ public String etag() {
}
/**
- * Get the tags property: Resource tags.
+ * 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.
*
- * @return the tags value.
+ * @param etag the etag value to set.
+ * @return the CreditSummaryInner object itself.
*/
- public Map tags() {
- return this.tags;
+ public CreditSummaryInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
}
/**
@@ -129,6 +125,16 @@ public Reseller reseller() {
return this.innerProperties() == null ? null : this.innerProperties().reseller();
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
+ }
+
/**
* Get the etag property: The eTag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
index cbe557ebe2bb5..82f107a97862d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.CreditBalanceSummary;
import com.azure.resourcemanager.consumption.models.Reseller;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of the credit summary. */
@Immutable
public final class CreditSummaryProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryProperties.class);
-
/*
* Summary of balances associated with this credit summary.
*/
@@ -59,12 +55,22 @@ public final class CreditSummaryProperties {
@JsonProperty(value = "reseller", access = JsonProperty.Access.WRITE_ONLY)
private Reseller reseller;
+ /*
+ * If true, the listed details are based on an estimation and it will be subjected to change.
+ */
+ @JsonProperty(value = "isEstimatedBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isEstimatedBalance;
+
/*
* The eTag for the resource.
*/
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /** Creates an instance of CreditSummaryProperties class. */
+ public CreditSummaryProperties() {
+ }
+
/**
* Get the balanceSummary property: Summary of balances associated with this credit summary.
*
@@ -128,6 +134,16 @@ public Reseller reseller() {
return this.reseller;
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.isEstimatedBalance;
+ }
+
/**
* Get the etag property: The eTag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java
index c431a1c9e2bfd..c0eb0a0e5eb85 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventProperties.java
@@ -5,20 +5,16 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate;
import com.azure.resourcemanager.consumption.models.EventType;
import com.azure.resourcemanager.consumption.models.Reseller;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** The event properties. */
@Fluent
public final class EventProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventProperties.class);
-
/*
* The date of the event.
*/
@@ -32,29 +28,25 @@ public final class EventProperties {
private String description;
/*
- * The amount of new credit or commitment for NewCredit or SettleCharges
- * event.
+ * The amount of new credit or commitment for NewCredit or SettleCharges event.
*/
@JsonProperty(value = "newCredit", access = JsonProperty.Access.WRITE_ONLY)
private Amount newCredit;
/*
- * The amount of balance adjustment. The property is not available for
- * ConsumptionCommitment lots.
+ * The amount of balance adjustment. The property is not available for ConsumptionCommitment lots.
*/
@JsonProperty(value = "adjustments", access = JsonProperty.Access.WRITE_ONLY)
private Amount adjustments;
/*
- * The amount of expired credit or commitment for NewCredit or
- * SettleCharges event.
+ * The amount of expired credit or commitment for NewCredit or SettleCharges event.
*/
@JsonProperty(value = "creditExpired", access = JsonProperty.Access.WRITE_ONLY)
private Amount creditExpired;
/*
- * The amount of charges for events of type SettleCharges and
- * PendingEligibleCharges.
+ * The amount of charges for events of type SettleCharges and PendingEligibleCharges.
*/
@JsonProperty(value = "charges", access = JsonProperty.Access.WRITE_ONLY)
private Amount charges;
@@ -72,24 +64,22 @@ public final class EventProperties {
private EventType eventType;
/*
- * The number which uniquely identifies the invoice on which the event was
- * billed. This will be empty for unbilled events.
+ * The number which uniquely identifies the invoice on which the event was billed. This will be empty for unbilled
+ * events.
*/
@JsonProperty(value = "invoiceNumber", access = JsonProperty.Access.WRITE_ONLY)
private String invoiceNumber;
/*
- * The ID that uniquely identifies the billing profile for which the event
- * happened. The property is only available for billing account of type
- * MicrosoftCustomerAgreement.
+ * The ID that uniquely identifies the billing profile for which the event happened. The property is only available
+ * for billing account of type MicrosoftCustomerAgreement.
*/
@JsonProperty(value = "billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
private String billingProfileId;
/*
- * The display name of the billing profile for which the event happened.
- * The property is only available for billing account of type
- * MicrosoftCustomerAgreement.
+ * The display name of the billing profile for which the event happened. The property is only available for billing
+ * account of type MicrosoftCustomerAgreement.
*/
@JsonProperty(value = "billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
private String billingProfileDisplayName;
@@ -131,15 +121,13 @@ public final class EventProperties {
private Reseller reseller;
/*
- * The amount of expired credit or commitment for NewCredit or
- * SettleCharges event in billing currency.
+ * The amount of expired credit or commitment for NewCredit or SettleCharges event in billing currency.
*/
@JsonProperty(value = "creditExpiredInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate creditExpiredInBillingCurrency;
/*
- * The amount of new credit or commitment for NewCredit or SettleCharges
- * event in billing currency.
+ * The amount of new credit or commitment for NewCredit or SettleCharges event in billing currency.
*/
@JsonProperty(value = "newCreditInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate newCreditInBillingCurrency;
@@ -151,8 +139,7 @@ public final class EventProperties {
private AmountWithExchangeRate adjustmentsInBillingCurrency;
/*
- * The amount of charges for events of type SettleCharges and
- * PendingEligibleCharges in billing currency.
+ * The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing currency.
*/
@JsonProperty(value = "chargesInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate chargesInBillingCurrency;
@@ -163,12 +150,22 @@ public final class EventProperties {
@JsonProperty(value = "closedBalanceInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private AmountWithExchangeRate closedBalanceInBillingCurrency;
+ /*
+ * If true, the listed details are based on an estimation and it will be subjected to change.
+ */
+ @JsonProperty(value = "isEstimatedBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isEstimatedBalance;
+
/*
* The eTag for the resource.
*/
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /** Creates an instance of EventProperties class. */
+ public EventProperties() {
+ }
+
/**
* Get the transactionDate property: The date of the event.
*
@@ -385,6 +382,16 @@ public AmountWithExchangeRate closedBalanceInBillingCurrency() {
return this.closedBalanceInBillingCurrency;
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.isEstimatedBalance;
+ }
+
/**
* Get the etag property: The eTag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
index e031fc2d183d7..d7311cfae343b 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
@@ -6,20 +6,16 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate;
import com.azure.resourcemanager.consumption.models.EventType;
import com.azure.resourcemanager.consumption.models.Reseller;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** An event summary resource. */
@Fluent
public final class EventSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventSummaryInner.class);
-
/*
* The event properties.
*/
@@ -27,13 +23,16 @@ public final class EventSummaryInner extends ProxyResource {
private EventProperties innerProperties;
/*
- * eTag of the resource. To handle concurrent update scenario, this field
- * will be used to determine whether the user is updating the latest
- * version or not.
+ * 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.
*/
@JsonProperty(value = "eTag")
private String etag;
+ /** Creates an instance of EventSummaryInner class. */
+ public EventSummaryInner() {
+ }
+
/**
* Get the innerProperties property: The event properties.
*
@@ -284,6 +283,16 @@ public AmountWithExchangeRate closedBalanceInBillingCurrency() {
return this.innerProperties() == null ? null : this.innerProperties().closedBalanceInBillingCurrency();
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
+ }
+
/**
* Get the etag property: The eTag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
index 935660710f205..730db0858b8bd 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
/** The properties of legacy charge summary. */
@Immutable
public final class LegacyChargeSummaryProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyChargeSummaryProperties.class);
-
/*
* The id of the billing period resource that the charge belongs to.
*/
@@ -48,8 +44,8 @@ public final class LegacyChargeSummaryProperties {
/*
* Marketplace Charges.
*/
- @JsonProperty(value = "marketplaceCharges", access = JsonProperty.Access.WRITE_ONLY)
- private BigDecimal marketplaceCharges;
+ @JsonProperty(value = "azureMarketplaceCharges", access = JsonProperty.Access.WRITE_ONLY)
+ private BigDecimal azureMarketplaceCharges;
/*
* Currency Code
@@ -57,6 +53,10 @@ public final class LegacyChargeSummaryProperties {
@JsonProperty(value = "currency", access = JsonProperty.Access.WRITE_ONLY)
private String currency;
+ /** Creates an instance of LegacyChargeSummaryProperties class. */
+ public LegacyChargeSummaryProperties() {
+ }
+
/**
* Get the billingPeriodId property: The id of the billing period resource that the charge belongs to.
*
@@ -103,12 +103,12 @@ public BigDecimal chargesBilledSeparately() {
}
/**
- * Get the marketplaceCharges property: Marketplace Charges.
+ * Get the azureMarketplaceCharges property: Marketplace Charges.
*
- * @return the marketplaceCharges value.
+ * @return the azureMarketplaceCharges value.
*/
- public BigDecimal marketplaceCharges() {
- return this.marketplaceCharges;
+ public BigDecimal azureMarketplaceCharges() {
+ return this.azureMarketplaceCharges;
}
/**
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java
index 55ddcf621918a..151688e5e90b0 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyReservationTransactionProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -15,8 +13,6 @@
/** The properties of a legacy reservation transaction. */
@Immutable
public final class LegacyReservationTransactionProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyReservationTransactionProperties.class);
-
/*
* The date of the transaction
*/
@@ -24,10 +20,9 @@ public final class LegacyReservationTransactionProperties {
private OffsetDateTime eventDate;
/*
- * The reservation order ID is the identifier for a reservation purchase.
- * Each reservation order ID represents a single purchase transaction. A
- * reservation order contains reservations. The reservation order specifies
- * the VM size and region for the reservations.
+ * The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a
+ * single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM
+ * size and region for the reservations.
*/
@JsonProperty(value = "reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationOrderId;
@@ -39,7 +34,7 @@ public final class LegacyReservationTransactionProperties {
private String description;
/*
- * The type of the transaction (Purchase, Cancel, etc.)
+ * The type of the transaction (Purchase, Cancel or Refund).
*/
@JsonProperty(value = "eventType", access = JsonProperty.Access.WRITE_ONLY)
private String eventType;
@@ -87,8 +82,7 @@ public final class LegacyReservationTransactionProperties {
private String purchasingSubscriptionName;
/*
- * This is the ARM Sku name. It can be used to join with the serviceType
- * field in additional info in usage records.
+ * This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
*/
@JsonProperty(value = "armSkuName", access = JsonProperty.Access.WRITE_ONLY)
private String armSkuName;
@@ -124,8 +118,7 @@ public final class LegacyReservationTransactionProperties {
private String departmentName;
/*
- * The cost center of this department if it is a department and a cost
- * center is provided.
+ * The cost center of this department if it is a department and a cost center is provided.
*/
@JsonProperty(value = "costCenter", access = JsonProperty.Access.WRITE_ONLY)
private String costCenter;
@@ -160,6 +153,10 @@ public final class LegacyReservationTransactionProperties {
@JsonProperty(value = "overage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal overage;
+ /** Creates an instance of LegacyReservationTransactionProperties class. */
+ public LegacyReservationTransactionProperties() {
+ }
+
/**
* Get the eventDate property: The date of the transaction.
*
@@ -190,7 +187,7 @@ public String description() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
index 39b1dfa8f8120..ac9e536b57496 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
@@ -5,10 +5,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.MeterDetailsResponse;
import com.azure.resourcemanager.consumption.models.PricingModelType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -17,8 +15,6 @@
/** The properties of the legacy usage detail. */
@Immutable
public final class LegacyUsageDetailProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyUsageDetailProperties.class);
-
/*
* Billing Account identifier.
*/
@@ -86,31 +82,27 @@ public final class LegacyUsageDetailProperties {
private OffsetDateTime date;
/*
- * Product name for the consumed service or purchase. Not available for
- * Marketplace.
+ * Product name for the consumed service or purchase. Not available for Marketplace.
*/
@JsonProperty(value = "product", access = JsonProperty.Access.WRITE_ONLY)
private String product;
/*
- * Part Number of the service used. Can be used to join with the price
- * sheet. Not available for marketplace.
+ * Part Number of the service used. Can be used to join with the price sheet. Not available for marketplace.
*/
@JsonProperty(value = "partNumber", access = JsonProperty.Access.WRITE_ONLY)
private String partNumber;
/*
- * The meter id (GUID). Not available for marketplace. For reserved
- * instance this represents the primary meter for which the reservation was
- * purchased. For the actual VM Size for which the reservation is purchased
- * see productOrderName.
+ * The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for
+ * which the reservation was purchased. For the actual VM Size for which the reservation is purchased see
+ * productOrderName.
*/
@JsonProperty(value = "meterId", access = JsonProperty.Access.WRITE_ONLY)
private UUID meterId;
/*
- * The details about the meter. By default this is not populated, unless
- * it's specified in $expand.
+ * The details about the meter. By default this is not populated, unless it's specified in $expand.
*/
@JsonProperty(value = "meterDetails", access = JsonProperty.Access.WRITE_ONLY)
private MeterDetailsResponse meterDetails;
@@ -134,8 +126,7 @@ public final class LegacyUsageDetailProperties {
private BigDecimal cost;
/*
- * Unit Price is the price applicable to you. (your EA or other contract
- * price).
+ * Unit Price is the price applicable to you. (your EA or other contract price).
*/
@JsonProperty(value = "unitPrice", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal unitPrice;
@@ -153,9 +144,8 @@ public final class LegacyUsageDetailProperties {
private String resourceLocation;
/*
- * Consumed service name. Name of the azure resource provider that emits
- * the usage or was purchased. This value is not provided for marketplace
- * usage.
+ * Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is
+ * not provided for marketplace usage.
*/
@JsonProperty(value = "consumedService", access = JsonProperty.Access.WRITE_ONLY)
private String consumedService;
@@ -185,10 +175,9 @@ public final class LegacyUsageDetailProperties {
private String serviceInfo2;
/*
- * Additional details of this usage item. By default this is not populated,
- * unless it's specified in $expand. Use this field to get usage line item
- * specific details such as the actual VM Size (ServiceType) or the ratio
- * in which the reservation discount is applied.
+ * Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use
+ * this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in
+ * which the reservation discount is applied.
*/
@JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
private String additionalInfo;
@@ -200,8 +189,7 @@ public final class LegacyUsageDetailProperties {
private String invoiceSection;
/*
- * The cost center of this department if it is a department and a cost
- * center is provided.
+ * The cost center of this department if it is a department and a cost center is provided.
*/
@JsonProperty(value = "costCenter", access = JsonProperty.Access.WRITE_ONLY)
private String costCenter;
@@ -213,16 +201,14 @@ public final class LegacyUsageDetailProperties {
private String resourceGroup;
/*
- * ARM resource id of the reservation. Only applies to records relevant to
- * reservations.
+ * ARM resource id of the reservation. Only applies to records relevant to reservations.
*/
@JsonProperty(value = "reservationId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationId;
/*
- * User provided display name of the reservation. Last known name for a
- * particular day is populated in the daily data. Only applies to records
- * relevant to reservations.
+ * User provided display name of the reservation. Last known name for a particular day is populated in the daily
+ * data. Only applies to records relevant to reservations.
*/
@JsonProperty(value = "reservationName", access = JsonProperty.Access.WRITE_ONLY)
private String reservationName;
@@ -252,8 +238,8 @@ public final class LegacyUsageDetailProperties {
private Boolean isAzureCreditEligible;
/*
- * Term (in months). 1 month for monthly recurring purchase. 12 months for
- * a 1 year reservation. 36 months for a 3 year reservation.
+ * Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year reservation. 36 months for a 3
+ * year reservation.
*/
@JsonProperty(value = "term", access = JsonProperty.Access.WRITE_ONLY)
private String term;
@@ -277,16 +263,14 @@ public final class LegacyUsageDetailProperties {
private String planName;
/*
- * Indicates a charge represents credits, usage, a Marketplace purchase, a
- * reservation fee, or a refund.
+ * Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.
*/
@JsonProperty(value = "chargeType", access = JsonProperty.Access.WRITE_ONLY)
private String chargeType;
/*
- * Indicates how frequently this charge will occur. OneTime for purchases
- * which only happen once, Monthly for fees which recur every month, and
- * UsageBased for charges based on how much a service is used.
+ * Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees
+ * which recur every month, and UsageBased for charges based on how much a service is used.
*/
@JsonProperty(value = "frequency", access = JsonProperty.Access.WRITE_ONLY)
private String frequency;
@@ -297,12 +281,28 @@ public final class LegacyUsageDetailProperties {
@JsonProperty(value = "payGPrice", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal payGPrice;
+ /*
+ * Unique identifier for the applicable benefit.
+ */
+ @JsonProperty(value = "benefitId", access = JsonProperty.Access.WRITE_ONLY)
+ private String benefitId;
+
+ /*
+ * Name of the applicable benefit.
+ */
+ @JsonProperty(value = "benefitName", access = JsonProperty.Access.WRITE_ONLY)
+ private String benefitName;
+
/*
* Identifier that indicates how the meter is priced.
*/
@JsonProperty(value = "pricingModel", access = JsonProperty.Access.WRITE_ONLY)
private PricingModelType pricingModel;
+ /** Creates an instance of LegacyUsageDetailProperties class. */
+ public LegacyUsageDetailProperties() {
+ }
+
/**
* Get the billingAccountId property: Billing Account identifier.
*
@@ -704,6 +704,24 @@ public BigDecimal payGPrice() {
return this.payGPrice;
}
+ /**
+ * Get the benefitId property: Unique identifier for the applicable benefit.
+ *
+ * @return the benefitId value.
+ */
+ public String benefitId() {
+ return this.benefitId;
+ }
+
+ /**
+ * Get the benefitName property: Name of the applicable benefit.
+ *
+ * @return the benefitName value.
+ */
+ public String benefitName() {
+ return this.benefitName;
+ }
+
/**
* Get the pricingModel property: Identifier that indicates how the meter is priced.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
index 6849ba86cdac2..45c8f7cd2c574 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
@@ -5,21 +5,17 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate;
import com.azure.resourcemanager.consumption.models.LotSource;
import com.azure.resourcemanager.consumption.models.Reseller;
import com.azure.resourcemanager.consumption.models.Status;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** The lot properties. */
@Immutable
public final class LotProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LotProperties.class);
-
/*
* The original amount of a lot.
*/
@@ -51,8 +47,8 @@ public final class LotProperties {
private OffsetDateTime expirationDate;
/*
- * The po number of the invoice on which the lot was added. This property
- * is not available for ConsumptionCommitment lots.
+ * The po number of the invoice on which the lot was added. This property is not available for
+ * ConsumptionCommitment lots.
*/
@JsonProperty(value = "poNumber", access = JsonProperty.Access.WRITE_ONLY)
private String poNumber;
@@ -99,12 +95,22 @@ public final class LotProperties {
@JsonProperty(value = "reseller", access = JsonProperty.Access.WRITE_ONLY)
private Reseller reseller;
+ /*
+ * If true, the listed details are based on an estimation and it will be subjected to change.
+ */
+ @JsonProperty(value = "isEstimatedBalance", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isEstimatedBalance;
+
/*
* The eTag for the resource.
*/
@JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
+ /** Creates an instance of LotProperties class. */
+ public LotProperties() {
+ }
+
/**
* Get the originalAmount property: The original amount of a lot.
*
@@ -223,6 +229,16 @@ public Reseller reseller() {
return this.reseller;
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.isEstimatedBalance;
+ }
+
/**
* Get the etag property: The eTag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
index 66ba7de656caf..c8ac84f96a280 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
@@ -6,21 +6,17 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate;
import com.azure.resourcemanager.consumption.models.LotSource;
import com.azure.resourcemanager.consumption.models.Reseller;
import com.azure.resourcemanager.consumption.models.Status;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** A lot summary resource. */
@Fluent
public final class LotSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LotSummaryInner.class);
-
/*
* The lot properties.
*/
@@ -28,13 +24,16 @@ public final class LotSummaryInner extends ProxyResource {
private LotProperties 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.
+ * 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.
*/
@JsonProperty(value = "eTag")
private String etag;
+ /** Creates an instance of LotSummaryInner class. */
+ public LotSummaryInner() {
+ }
+
/**
* Get the innerProperties property: The lot properties.
*
@@ -184,6 +183,16 @@ public Reseller reseller() {
return this.innerProperties() == null ? null : this.innerProperties().reseller();
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
+ }
+
/**
* Get the etag property: The eTag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
index de916d475acc9..fbd40e92b7e86 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -15,11 +13,8 @@
/** The properties of the Management Group Aggregated Cost. */
@Fluent
public final class ManagementGroupAggregatedCostProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementGroupAggregatedCostProperties.class);
-
/*
- * The id of the billing period resource that the aggregated cost belongs
- * to.
+ * The id of the billing period resource that the aggregated cost belongs to.
*/
@JsonProperty(value = "billingPeriodId", access = JsonProperty.Access.WRITE_ONLY)
private String billingPeriodId;
@@ -67,19 +62,21 @@ public final class ManagementGroupAggregatedCostProperties {
private List children;
/*
- * List of subscription Guids included in the calculation of aggregated
- * cost
+ * List of subscription Guids included in the calculation of aggregated cost
*/
@JsonProperty(value = "includedSubscriptions")
private List includedSubscriptions;
/*
- * List of subscription Guids excluded from the calculation of aggregated
- * cost
+ * List of subscription Guids excluded from the calculation of aggregated cost
*/
@JsonProperty(value = "excludedSubscriptions")
private List excludedSubscriptions;
+ /** Creates an instance of ManagementGroupAggregatedCostProperties class. */
+ public ManagementGroupAggregatedCostProperties() {
+ }
+
/**
* Get the billingPeriodId property: The id of the billing period resource that the aggregated cost belongs to.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
index dfe72201c6f30..f0a0972b22ec6 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
@@ -6,8 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -18,8 +16,6 @@
/** A management group aggregated cost resource. */
@Fluent
public final class ManagementGroupAggregatedCostResultInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementGroupAggregatedCostResultInner.class);
-
/*
* The properties of the Management Group Aggregated Cost.
*/
@@ -39,6 +35,10 @@ public final class ManagementGroupAggregatedCostResultInner extends ProxyResourc
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of ManagementGroupAggregatedCostResultInner class. */
+ public ManagementGroupAggregatedCostResultInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the Management Group Aggregated Cost.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
index 659cbacda58b6..ab8e7318f6312 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
@@ -4,10 +4,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -16,10 +14,8 @@
import java.util.UUID;
/** A marketplace resource. */
-@Fluent
+@Immutable
public final class MarketplaceInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplaceInner.class);
-
/*
* The properties of the marketplace usage detail.
*/
@@ -39,6 +35,10 @@ public final class MarketplaceInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of MarketplaceInner class. */
+ public MarketplaceInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the marketplace usage detail.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
index 006420b0220af..e775e13ae3722 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -15,8 +13,6 @@
/** The properties of the marketplace usage detail. */
@Immutable
public final class MarketplaceProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplaceProperties.class);
-
/*
* The id of the billing period resource that the usage belongs to.
*/
@@ -144,15 +140,13 @@ public final class MarketplaceProperties {
private String consumedService;
/*
- * The cost center of this department if it is a department and a
- * costcenter exists
+ * The cost center of this department if it is a department and a costcenter exists
*/
@JsonProperty(value = "costCenter", access = JsonProperty.Access.WRITE_ONLY)
private String costCenter;
/*
- * Additional details of this usage item. By default this is not populated,
- * unless it's specified in $expand.
+ * Additional details of this usage item. By default this is not populated, unless it's specified in $expand.
*/
@JsonProperty(value = "additionalProperties", access = JsonProperty.Access.WRITE_ONLY)
private String additionalProperties;
@@ -175,6 +169,10 @@ public final class MarketplaceProperties {
@JsonProperty(value = "isRecurringCharge", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isRecurringCharge;
+ /** Creates an instance of MarketplaceProperties class. */
+ public MarketplaceProperties() {
+ }
+
/**
* Get the billingPeriodId property: The id of the billing period resource that the usage belongs to.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
index 9a5a2f9e026a6..246d330d7a3f0 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of modern charge summary. */
@Immutable
public final class ModernChargeSummaryProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernChargeSummaryProperties.class);
-
/*
* The id of the billing period resource that the charge belongs to.
*/
@@ -81,6 +77,16 @@ public final class ModernChargeSummaryProperties {
@JsonProperty(value = "isInvoiced", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isInvoiced;
+ /*
+ * Subscription guid.
+ */
+ @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionId;
+
+ /** Creates an instance of ModernChargeSummaryProperties class. */
+ public ModernChargeSummaryProperties() {
+ }
+
/**
* Get the billingPeriodId property: The id of the billing period resource that the charge belongs to.
*
@@ -180,6 +186,15 @@ public Boolean isInvoiced() {
return this.isInvoiced;
}
+ /**
+ * Get the subscriptionId property: Subscription guid.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
index 636c1f94bcf5a..bcb2516d6a3f9 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionInner.java
@@ -4,26 +4,27 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ReservationTransactionResource;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.UUID;
/** Modern Reservation transaction resource. */
-@Fluent
+@Immutable
public final class ModernReservationTransactionInner extends ReservationTransactionResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationTransactionInner.class);
-
/*
* The properties of a modern reservation transaction.
*/
@JsonProperty(value = "properties", required = true)
private ModernReservationTransactionProperties innerProperties = new ModernReservationTransactionProperties();
+ /** Creates an instance of ModernReservationTransactionInner class. */
+ public ModernReservationTransactionInner() {
+ }
+
/**
* Get the innerProperties property: The properties of a modern reservation transaction.
*
@@ -107,7 +108,7 @@ public OffsetDateTime eventDate() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
@@ -225,7 +226,7 @@ public String term() {
public void validate() {
super.validate();
if (innerProperties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property innerProperties in model ModernReservationTransactionInner"));
@@ -233,4 +234,6 @@ public void validate() {
innerProperties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ModernReservationTransactionInner.class);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
index fb749b85a5581..cb87dba75c37e 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -15,8 +13,6 @@
/** The properties of a modern reservation transaction. */
@Immutable
public final class ModernReservationTransactionProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernReservationTransactionProperties.class);
-
/*
* The charge of the transaction.
*/
@@ -24,8 +20,7 @@ public final class ModernReservationTransactionProperties {
private BigDecimal amount;
/*
- * This is the ARM Sku name. It can be used to join with the serviceType
- * field in additional info in usage records.
+ * This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
*/
@JsonProperty(value = "armSkuName", access = JsonProperty.Access.WRITE_ONLY)
private String armSkuName;
@@ -67,7 +62,7 @@ public final class ModernReservationTransactionProperties {
private OffsetDateTime eventDate;
/*
- * The type of the transaction (Purchase, Cancel, etc.)
+ * The type of the transaction (Purchase, Cancel or Refund).
*/
@JsonProperty(value = "eventType", access = JsonProperty.Access.WRITE_ONLY)
private String eventType;
@@ -121,10 +116,9 @@ public final class ModernReservationTransactionProperties {
private String region;
/*
- * The reservation order ID is the identifier for a reservation purchase.
- * Each reservation order ID represents a single purchase transaction. A
- * reservation order contains reservations. The reservation order specifies
- * the VM size and region for the reservations.
+ * The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a
+ * single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM
+ * size and region for the reservations.
*/
@JsonProperty(value = "reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationOrderId;
@@ -141,6 +135,10 @@ public final class ModernReservationTransactionProperties {
@JsonProperty(value = "term", access = JsonProperty.Access.WRITE_ONLY)
private String term;
+ /** Creates an instance of ModernReservationTransactionProperties class. */
+ public ModernReservationTransactionProperties() {
+ }
+
/**
* Get the amount property: The charge of the transaction.
*
@@ -215,7 +213,7 @@ public OffsetDateTime eventDate() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
index 00c64480a2cdc..f08e2c01cacad 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
@@ -5,9 +5,7 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.PricingModelType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -16,8 +14,6 @@
/** The properties of the usage detail. */
@Immutable
public final class ModernUsageDetailProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernUsageDetailProperties.class);
-
/*
* Billing Account identifier.
*/
@@ -55,18 +51,16 @@ public final class ModernUsageDetailProperties {
private OffsetDateTime billingPeriodEndDate;
/*
- * Identifier for the billing profile that groups costs across invoices in
- * the a singular billing currency across across the customers who have
- * onboarded the Microsoft customer agreement and the customers in CSP who
- * have made entitlement purchases like SaaS, Marketplace, RI, etc.
+ * Identifier for the billing profile that groups costs across invoices in the a singular billing currency across
+ * across the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made
+ * entitlement purchases like SaaS, Marketplace, RI, etc.
*/
@JsonProperty(value = "billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
private String billingProfileId;
/*
- * Name of the billing profile that groups costs across invoices in the a
- * singular billing currency across across the customers who have onboarded
- * the Microsoft customer agreement and the customers in CSP who have made
+ * Name of the billing profile that groups costs across invoices in the a singular billing currency across across
+ * the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made
* entitlement purchases like SaaS, Marketplace, RI, etc.
*/
@JsonProperty(value = "billingProfileName", access = JsonProperty.Access.WRITE_ONLY)
@@ -91,17 +85,16 @@ public final class ModernUsageDetailProperties {
private OffsetDateTime date;
/*
- * Name of the product that has accrued charges by consumption or purchase
- * as listed in the invoice. Not available for Marketplace.
+ * Name of the product that has accrued charges by consumption or purchase as listed in the invoice. Not available
+ * for Marketplace.
*/
@JsonProperty(value = "product", access = JsonProperty.Access.WRITE_ONLY)
private String product;
/*
- * The meter id (GUID). Not available for marketplace. For reserved
- * instance this represents the primary meter for which the reservation was
- * purchased. For the actual VM Size for which the reservation is purchased
- * see productOrderName.
+ * The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for
+ * which the reservation was purchased. For the actual VM Size for which the reservation is purchased see
+ * productOrderName.
*/
@JsonProperty(value = "meterId", access = JsonProperty.Access.WRITE_ONLY)
private UUID meterId;
@@ -113,8 +106,7 @@ public final class ModernUsageDetailProperties {
private String meterName;
/*
- * Identifies the location of the datacenter for certain services that are
- * priced based on datacenter location.
+ * Identifies the location of the datacenter for certain services that are priced based on datacenter location.
*/
@JsonProperty(value = "meterRegion", access = JsonProperty.Access.WRITE_ONLY)
private String meterRegion;
@@ -126,29 +118,25 @@ public final class ModernUsageDetailProperties {
private String meterCategory;
/*
- * Defines the type or sub-category of Azure service that can affect the
- * rate.
+ * Defines the type or sub-category of Azure service that can affect the rate.
*/
@JsonProperty(value = "meterSubCategory", access = JsonProperty.Access.WRITE_ONLY)
private String meterSubCategory;
/*
- * List the service family for the product purchased or charged (Example:
- * Storage ; Compute).
+ * List the service family for the product purchased or charged (Example: Storage ; Compute).
*/
@JsonProperty(value = "serviceFamily", access = JsonProperty.Access.WRITE_ONLY)
private String serviceFamily;
/*
- * Measure the quantity purchased or consumed.The amount of the meter used
- * during the billing period.
+ * Measure the quantity purchased or consumed.The amount of the meter used during the billing period.
*/
@JsonProperty(value = "quantity", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal quantity;
/*
- * Identifies the Unit that the service is charged in. For example, GB,
- * hours, 10,000 s.
+ * Identifies the Unit that the service is charged in. For example, GB, hours, 10,000 s.
*/
@JsonProperty(value = "unitOfMeasure", access = JsonProperty.Access.WRITE_ONLY)
private String unitOfMeasure;
@@ -166,8 +154,7 @@ public final class ModernUsageDetailProperties {
private BigDecimal costInUsd;
/*
- * Unit Price is the price applicable to you. (your EA or other contract
- * price).
+ * Unit Price is the price applicable to you. (your EA or other contract price).
*/
@JsonProperty(value = "unitPrice", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal unitPrice;
@@ -185,9 +172,8 @@ public final class ModernUsageDetailProperties {
private String resourceLocation;
/*
- * Consumed service name. Name of the azure resource provider that emits
- * the usage or was purchased. This value is not provided for marketplace
- * usage.
+ * Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is
+ * not provided for marketplace usage.
*/
@JsonProperty(value = "consumedService", access = JsonProperty.Access.WRITE_ONLY)
private String consumedService;
@@ -205,60 +191,54 @@ public final class ModernUsageDetailProperties {
private String serviceInfo2;
/*
- * Additional details of this usage item. Use this field to get usage line
- * item specific details such as the actual VM Size (ServiceType) or the
- * ratio in which the reservation discount is applied.
+ * Additional details of this usage item. Use this field to get usage line item specific details such as the actual
+ * VM Size (ServiceType) or the ratio in which the reservation discount is applied.
*/
@JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
private String additionalInfo;
/*
- * Identifier of the project that is being charged in the invoice. Not
- * applicable for Microsoft Customer Agreements onboarded by partners.
+ * Identifier of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements
+ * onboarded by partners.
*/
@JsonProperty(value = "invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
private String invoiceSectionId;
/*
- * Name of the project that is being charged in the invoice. Not applicable
- * for Microsoft Customer Agreements onboarded by partners.
+ * Name of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements
+ * onboarded by partners.
*/
@JsonProperty(value = "invoiceSectionName", access = JsonProperty.Access.WRITE_ONLY)
private String invoiceSectionName;
/*
- * The cost center of this department if it is a department and a cost
- * center is provided.
+ * The cost center of this department if it is a department and a cost center is provided.
*/
@JsonProperty(value = "costCenter", access = JsonProperty.Access.WRITE_ONLY)
private String costCenter;
/*
- * Name of the Azure resource group used for cohesive lifecycle management
- * of resources.
+ * Name of the Azure resource group used for cohesive lifecycle management of resources.
*/
@JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY)
private String resourceGroup;
/*
- * ARM resource id of the reservation. Only applies to records relevant to
- * reservations.
+ * ARM resource id of the reservation. Only applies to records relevant to reservations.
*/
@JsonProperty(value = "reservationId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationId;
/*
- * User provided display name of the reservation. Last known name for a
- * particular day is populated in the daily data. Only applies to records
- * relevant to reservations.
+ * User provided display name of the reservation. Last known name for a particular day is populated in the daily
+ * data. Only applies to records relevant to reservations.
*/
@JsonProperty(value = "reservationName", access = JsonProperty.Access.WRITE_ONLY)
private String reservationName;
/*
- * The identifier for the asset or Azure plan name that the subscription
- * belongs to. For example: Azure Plan. For reservations this is the
- * Reservation Order ID.
+ * The identifier for the asset or Azure plan name that the subscription belongs to. For example: Azure Plan. For
+ * reservations this is the Reservation Order ID.
*/
@JsonProperty(value = "productOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String productOrderId;
@@ -276,40 +256,34 @@ public final class ModernUsageDetailProperties {
private Boolean isAzureCreditEligible;
/*
- * Term (in months). Displays the term for the validity of the offer. For
- * example. In case of reserved instances it displays 12 months for yearly
- * term of reserved instance. For one time purchases or recurring
- * purchases, the terms displays 1 month; This is not applicable for Azure
- * consumption.
+ * Term (in months). Displays the term for the validity of the offer. For example. In case of reserved instances it
+ * displays 12 months for yearly term of reserved instance. For one time purchases or recurring purchases, the
+ * terms displays 1 month; This is not applicable for Azure consumption.
*/
@JsonProperty(value = "term", access = JsonProperty.Access.WRITE_ONLY)
private String term;
/*
- * Name of the publisher of the service including Microsoft or Third Party
- * publishers.
+ * Name of the publisher of the service including Microsoft or Third Party publishers.
*/
@JsonProperty(value = "publisherName", access = JsonProperty.Access.WRITE_ONLY)
private String publisherName;
/*
- * Type of publisher that identifies if the publisher is first party, third
- * party reseller or third party agency.
+ * Type of publisher that identifies if the publisher is first party, third party reseller or third party agency.
*/
@JsonProperty(value = "publisherType", access = JsonProperty.Access.WRITE_ONLY)
private String publisherType;
/*
- * Indicates a charge represents credits, usage, a Marketplace purchase, a
- * reservation fee, or a refund.
+ * Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.
*/
@JsonProperty(value = "chargeType", access = JsonProperty.Access.WRITE_ONLY)
private String chargeType;
/*
- * Indicates how frequently this charge will occur. OneTime for purchases
- * which only happen once, Monthly for fees which recur every month, and
- * UsageBased for charges based on how much a service is used.
+ * Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees
+ * which recur every month, and UsageBased for charges based on how much a service is used.
*/
@JsonProperty(value = "frequency", access = JsonProperty.Access.WRITE_ONLY)
private String frequency;
@@ -321,22 +295,19 @@ public final class ModernUsageDetailProperties {
private BigDecimal costInBillingCurrency;
/*
- * ExtendedCost or blended cost before tax in pricing currency to correlate
- * with prices.
+ * ExtendedCost or blended cost before tax in pricing currency to correlate with prices.
*/
@JsonProperty(value = "costInPricingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal costInPricingCurrency;
/*
- * Exchange rate used in conversion from pricing currency to billing
- * currency.
+ * Exchange rate used in conversion from pricing currency to billing currency.
*/
@JsonProperty(value = "exchangeRate", access = JsonProperty.Access.WRITE_ONLY)
private String exchangeRate;
/*
- * Date on which exchange rate used in conversion from pricing currency to
- * billing currency.
+ * Date on which exchange rate used in conversion from pricing currency to billing currency.
*/
@JsonProperty(value = "exchangeRateDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime exchangeRateDate;
@@ -348,8 +319,8 @@ public final class ModernUsageDetailProperties {
private String invoiceId;
/*
- * Reference to an original invoice there is a refund (negative cost). This
- * is populated only when there is a refund.
+ * Reference to an original invoice there is a refund (negative cost). This is populated only when there is a
+ * refund.
*/
@JsonProperty(value = "previousInvoiceId", access = JsonProperty.Access.WRITE_ONLY)
private String previousInvoiceId;
@@ -361,9 +332,8 @@ public final class ModernUsageDetailProperties {
private String pricingCurrencyCode;
/*
- * Identifier for the product that has accrued charges by consumption or
- * purchase . This is the concatenated key of productId and SkuId in
- * partner center.
+ * Identifier for the product that has accrued charges by consumption or purchase . This is the concatenated key of
+ * productId and SkuId in partner center.
*/
@JsonProperty(value = "productIdentifier", access = JsonProperty.Access.WRITE_ONLY)
private String productIdentifier;
@@ -375,16 +345,15 @@ public final class ModernUsageDetailProperties {
private String resourceLocationNormalized;
/*
- * Start date for the rating period when the service usage was rated for
- * charges. The prices for Azure services are determined for the rating
- * period.
+ * Start date for the rating period when the service usage was rated for charges. The prices for Azure services are
+ * determined for the rating period.
*/
@JsonProperty(value = "servicePeriodStartDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime servicePeriodStartDate;
/*
- * End date for the period when the service usage was rated for charges.
- * The prices for Azure services are determined based on the rating period.
+ * End date for the period when the service usage was rated for charges. The prices for Azure services are
+ * determined based on the rating period.
*/
@JsonProperty(value = "servicePeriodEndDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime servicePeriodEndDate;
@@ -456,8 +425,7 @@ public final class ModernUsageDetailProperties {
private BigDecimal paygCostInUsd;
/*
- * Rate of discount applied if there is a partner earned credit (PEC) based
- * on partner admin link access.
+ * Rate of discount applied if there is a partner earned credit (PEC) based on partner admin link access.
*/
@JsonProperty(value = "partnerEarnedCreditRate", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal partnerEarnedCreditRate;
@@ -487,8 +455,7 @@ public final class ModernUsageDetailProperties {
private String benefitName;
/*
- * Identifier for Product Category or Line Of Business, Ex - Azure,
- * Microsoft 365, AWS e.t.c
+ * Identifier for Product Category or Line Of Business, Ex - Azure, Microsoft 365, AWS e.t.c
*/
@JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
private String provider;
@@ -499,6 +466,10 @@ public final class ModernUsageDetailProperties {
@JsonProperty(value = "costAllocationRuleName", access = JsonProperty.Access.WRITE_ONLY)
private String costAllocationRuleName;
+ /** Creates an instance of ModernUsageDetailProperties class. */
+ public ModernUsageDetailProperties() {
+ }
+
/**
* Get the billingAccountId property: Billing Account identifier.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
index fe76c6fdfa548..2b081521a8106 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** A Consumption REST API operation. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* Operation Id.
*/
@@ -33,6 +29,10 @@ public final class OperationInner {
@JsonProperty(value = "display")
private OperationDisplay display;
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
/**
* Get the id property: Operation Id.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java
new file mode 100644
index 0000000000000..2094753ab8216
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.consumption.models.OperationStatusType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The status of the long running operation. */
+@Fluent
+public final class OperationStatusInner {
+ /*
+ * The status of the long running operation.
+ */
+ @JsonProperty(value = "status")
+ private OperationStatusType status;
+
+ /*
+ * The properties of the resource generated.
+ */
+ @JsonProperty(value = "properties")
+ private PricesheetDownloadProperties innerProperties;
+
+ /** Creates an instance of OperationStatusInner class. */
+ public OperationStatusInner() {
+ }
+
+ /**
+ * Get the status property: The status of the long running operation.
+ *
+ * @return the status value.
+ */
+ public OperationStatusType status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The status of the long running operation.
+ *
+ * @param status the status value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStatus(OperationStatusType status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the resource generated.
+ *
+ * @return the innerProperties value.
+ */
+ private PricesheetDownloadProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the downloadUrl property: The link (url) to download the pricesheet.
+ *
+ * @return the downloadUrl value.
+ */
+ public String downloadUrl() {
+ return this.innerProperties() == null ? null : this.innerProperties().downloadUrl();
+ }
+
+ /**
+ * Get the validTill property: Download link validity.
+ *
+ * @return the validTill value.
+ */
+ public OffsetDateTime validTill() {
+ return this.innerProperties() == null ? null : this.innerProperties().validTill();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
index 0e4aa629a411c..4db63a05371f8 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.MeterDetails;
import com.azure.resourcemanager.consumption.models.PriceSheetProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** price sheet result. It contains the pricesheet associated with billing period. */
@Immutable
public final class PriceSheetModel {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PriceSheetModel.class);
-
/*
* Price sheet
*/
@@ -35,6 +31,10 @@ public final class PriceSheetModel {
@JsonProperty(value = "download", access = JsonProperty.Access.WRITE_ONLY)
private MeterDetails download;
+ /** Creates an instance of PriceSheetModel class. */
+ public PriceSheetModel() {
+ }
+
/**
* Get the pricesheets property: Price sheet.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
index 7d19b3f74d32d..c4613e3bc626a 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
@@ -4,25 +4,20 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.MeterDetails;
import com.azure.resourcemanager.consumption.models.PriceSheetProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
/** An pricesheet resource. */
-@Fluent
+@Immutable
public final class PriceSheetResultInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PriceSheetResultInner.class);
-
/*
- * price sheet result. It contains the pricesheet associated with billing
- * period
+ * price sheet result. It contains the pricesheet associated with billing period
*/
@JsonProperty(value = "properties")
private PriceSheetModel innerProperties;
@@ -40,6 +35,10 @@ public final class PriceSheetResultInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of PriceSheetResultInner class. */
+ public PriceSheetResultInner() {
+ }
+
/**
* Get the innerProperties property: price sheet result. It contains the pricesheet associated with billing period.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java
new file mode 100644
index 0000000000000..ec3cadd35a71a
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The properties of the price sheet download. */
+@Immutable
+public final class PricesheetDownloadProperties {
+ /*
+ * The link (url) to download the pricesheet.
+ */
+ @JsonProperty(value = "downloadUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String downloadUrl;
+
+ /*
+ * Download link validity.
+ */
+ @JsonProperty(value = "validTill", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime validTill;
+
+ /** Creates an instance of PricesheetDownloadProperties class. */
+ public PricesheetDownloadProperties() {
+ }
+
+ /**
+ * Get the downloadUrl property: The link (url) to download the pricesheet.
+ *
+ * @return the downloadUrl value.
+ */
+ public String downloadUrl() {
+ return this.downloadUrl;
+ }
+
+ /**
+ * Get the validTill property: Download link validity.
+ *
+ * @return the validTill value.
+ */
+ public OffsetDateTime validTill() {
+ return this.validTill;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
index ba58947769d81..fdf3c65464a40 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
@@ -4,10 +4,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -15,10 +13,8 @@
import java.util.Map;
/** reservation detail resource. */
-@Fluent
+@Immutable
public final class ReservationDetailInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationDetailInner.class);
-
/*
* The properties of the reservation detail.
*/
@@ -38,6 +34,10 @@ public final class ReservationDetailInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of ReservationDetailInner class. */
+ public ReservationDetailInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the reservation detail.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
index 99fe617af2d03..56bbaffb1e61b 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -14,13 +12,10 @@
/** The properties of the reservation detail. */
@Immutable
public final class ReservationDetailProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationDetailProperties.class);
-
/*
- * The reservation order ID is the identifier for a reservation purchase.
- * Each reservation order ID represents a single purchase transaction. A
- * reservation order contains reservations. The reservation order specifies
- * the VM size and region for the reservations.
+ * The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a
+ * single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM
+ * size and region for the reservations.
*/
@JsonProperty(value = "reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationOrderId;
@@ -38,25 +33,22 @@ public final class ReservationDetailProperties {
private String instanceFlexibilityGroup;
/*
- * The reservation ID is the identifier of a reservation within a
- * reservation order. Each reservation is the grouping for applying the
- * benefit scope and also specifies the number of instances to which the
- * reservation benefit can be applied to.
+ * The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the
+ * grouping for applying the benefit scope and also specifies the number of instances to which the reservation
+ * benefit can be applied to.
*/
@JsonProperty(value = "reservationId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationId;
/*
- * This is the ARM Sku name. It can be used to join with the serviceType
- * field in additional info in usage records.
+ * This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
*/
@JsonProperty(value = "skuName", access = JsonProperty.Access.WRITE_ONLY)
private String skuName;
/*
- * This is the total hours reserved for the day. E.g. if reservation for 1
- * instance was made on 1 PM, this will be 11 hours for that day and 24
- * hours from subsequent days.
+ * This is the total hours reserved for the day. E.g. if reservation for 1 instance was made on 1 PM, this will be
+ * 11 hours for that day and 24 hours from subsequent days.
*/
@JsonProperty(value = "reservedHours", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal reservedHours;
@@ -74,15 +66,13 @@ public final class ReservationDetailProperties {
private BigDecimal usedHours;
/*
- * This identifier is the name of the resource or the fully qualified
- * Resource ID.
+ * This identifier is the name of the resource or the fully qualified Resource ID.
*/
@JsonProperty(value = "instanceId", access = JsonProperty.Access.WRITE_ONLY)
private String instanceId;
/*
- * This is the total count of instances that are reserved for the
- * reservationId.
+ * This is the total count of instances that are reserved for the reservationId.
*/
@JsonProperty(value = "totalReservedQuantity", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal totalReservedQuantity;
@@ -93,6 +83,10 @@ public final class ReservationDetailProperties {
@JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
private String kind;
+ /** Creates an instance of ReservationDetailProperties class. */
+ public ReservationDetailProperties() {
+ }
+
/**
* Get the reservationOrderId property: The reservation order ID is the identifier for a reservation purchase. Each
* reservation order ID represents a single purchase transaction. A reservation order contains reservations. The
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
index 68e957a682f69..7a852a01876ea 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsModelInner.java
@@ -6,11 +6,9 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsResourceProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsSavingsProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsUsageProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -18,8 +16,6 @@
/** Reservation recommendation details. */
@Fluent
public final class ReservationRecommendationDetailsModelInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsModelInner.class);
-
/*
* Resource Location.
*/
@@ -51,6 +47,10 @@ public final class ReservationRecommendationDetailsModelInner extends ProxyResou
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of ReservationRecommendationDetailsModelInner class. */
+ public ReservationRecommendationDetailsModelInner() {
+ }
+
/**
* Get the location property: Resource Location.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
index adeb2dae589ca..8574b3cc96156 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsResourceProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsSavingsProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsUsageProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of the reservation recommendation. */
@Immutable
public final class ReservationRecommendationDetailsProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationDetailsProperties.class);
-
/*
* An ISO 4217 currency code identifier for the costs and savings
*/
@@ -53,6 +49,10 @@ public final class ReservationRecommendationDetailsProperties {
@JsonProperty(value = "usage", access = JsonProperty.Access.WRITE_ONLY)
private ReservationRecommendationDetailsUsageProperties usage;
+ /** Creates an instance of ReservationRecommendationDetailsProperties class. */
+ public ReservationRecommendationDetailsProperties() {
+ }
+
/**
* Get the currency property: An ISO 4217 currency code identifier for the costs and savings.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
index 45566e5e40127..afb943323e088 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
@@ -6,10 +6,8 @@
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.LegacyReservationRecommendation;
import com.azure.resourcemanager.consumption.models.ModernReservationRecommendation;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
@@ -30,8 +28,6 @@
})
@Immutable
public class ReservationRecommendationInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationRecommendationInner.class);
-
/*
* The etag for the resource.
*/
@@ -57,6 +53,10 @@ public class ReservationRecommendationInner extends ProxyResource {
@JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY)
private String sku;
+ /** Creates an instance of ReservationRecommendationInner class. */
+ public ReservationRecommendationInner() {
+ }
+
/**
* Get the etag property: The etag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
index 7b913e6e0ac36..555b5dc018de5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
@@ -4,10 +4,8 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
@@ -15,10 +13,8 @@
import java.util.Map;
/** reservation summary resource. */
-@Fluent
+@Immutable
public final class ReservationSummaryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummaryInner.class);
-
/*
* The properties of the reservation summary.
*/
@@ -38,6 +34,10 @@ public final class ReservationSummaryInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of ReservationSummaryInner class. */
+ public ReservationSummaryInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the reservation summary.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
index 2bd838de647ed..16c83b8d9f6c5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
@@ -5,8 +5,6 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
@@ -14,44 +12,37 @@
/** The properties of the reservation summary. */
@Immutable
public final class ReservationSummaryProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationSummaryProperties.class);
-
/*
- * The reservation order ID is the identifier for a reservation purchase.
- * Each reservation order ID represents a single purchase transaction. A
- * reservation order contains reservations. The reservation order specifies
- * the VM size and region for the reservations.
+ * The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a
+ * single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM
+ * size and region for the reservations.
*/
@JsonProperty(value = "reservationOrderId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationOrderId;
/*
- * The reservation ID is the identifier of a reservation within a
- * reservation order. Each reservation is the grouping for applying the
- * benefit scope and also specifies the number of instances to which the
- * reservation benefit can be applied to.
+ * The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the
+ * grouping for applying the benefit scope and also specifies the number of instances to which the reservation
+ * benefit can be applied to.
*/
@JsonProperty(value = "reservationId", access = JsonProperty.Access.WRITE_ONLY)
private String reservationId;
/*
- * This is the ARM Sku name. It can be used to join with the serviceType
- * field in additional info in usage records.
+ * This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
*/
@JsonProperty(value = "skuName", access = JsonProperty.Access.WRITE_ONLY)
private String skuName;
/*
- * This is the total hours reserved. E.g. if reservation for 1 instance was
- * made on 1 PM, this will be 11 hours for that day and 24 hours from
- * subsequent days
+ * This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for
+ * that day and 24 hours from subsequent days
*/
@JsonProperty(value = "reservedHours", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal reservedHours;
/*
- * Data corresponding to the utilization record. If the grain of data is
- * monthly, it will be first day of month.
+ * Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month.
*/
@JsonProperty(value = "usageDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime usageDate;
@@ -63,24 +54,21 @@ public final class ReservationSummaryProperties {
private BigDecimal usedHours;
/*
- * This is the minimum hourly utilization in the usage time (day or month).
- * E.g. if usage record corresponds to 12/10/2017 and on that for hour 4
- * and 5, utilization was 10%, this field will return 10% for that day
+ * This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to
+ * 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day
*/
@JsonProperty(value = "minUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal minUtilizationPercentage;
/*
- * This is average utilization for the entire time range. (day or month
- * depending on the grain)
+ * This is average utilization for the entire time range. (day or month depending on the grain)
*/
@JsonProperty(value = "avgUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal avgUtilizationPercentage;
/*
- * This is the maximum hourly utilization in the usage time (day or month).
- * E.g. if usage record corresponds to 12/10/2017 and on that for hour 4
- * and 5, utilization was 100%, this field will return 100% for that day.
+ * This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to
+ * 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day.
*/
@JsonProperty(value = "maxUtilizationPercentage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal maxUtilizationPercentage;
@@ -104,8 +92,7 @@ public final class ReservationSummaryProperties {
private BigDecimal remainingQuantity;
/*
- * This is the total count of instances that are reserved for the
- * reservationId.
+ * This is the total count of instances that are reserved for the reservationId.
*/
@JsonProperty(value = "totalReservedQuantity", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal totalReservedQuantity;
@@ -122,6 +109,10 @@ public final class ReservationSummaryProperties {
@JsonProperty(value = "utilizedPercentage", access = JsonProperty.Access.WRITE_ONLY)
private BigDecimal utilizedPercentage;
+ /** Creates an instance of ReservationSummaryProperties class. */
+ public ReservationSummaryProperties() {
+ }
+
/**
* Get the reservationOrderId property: The reservation order ID is the identifier for a reservation purchase. Each
* reservation order ID represents a single purchase transaction. A reservation order contains reservations. The
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
index f09a430c58bf4..f89084009e044 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationTransactionInner.java
@@ -4,26 +4,26 @@
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.consumption.models.ReservationTransactionResource;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.UUID;
/** Reservation transaction resource. */
-@Fluent
+@Immutable
public class ReservationTransactionInner extends ReservationTransactionResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReservationTransactionInner.class);
-
/*
* The properties of a legacy reservation transaction.
*/
@JsonProperty(value = "properties")
private LegacyReservationTransactionProperties innerProperties;
+ /** Creates an instance of ReservationTransactionInner class. */
+ public ReservationTransactionInner() {
+ }
+
/**
* Get the innerProperties property: The properties of a legacy reservation transaction.
*
@@ -63,7 +63,7 @@ public String description() {
}
/**
- * Get the eventType property: The type of the transaction (Purchase, Cancel, etc.).
+ * Get the eventType property: The type of the transaction (Purchase, Cancel or Refund).
*
* @return the eventType value.
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
index c38afadca36c3..64f9553d9e581 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Tag;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The properties of the tag. */
@Fluent
public final class TagProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TagProperties.class);
-
/*
* A list of Tag.
*/
@@ -34,6 +30,10 @@ public final class TagProperties {
@JsonProperty(value = "previousLink", access = JsonProperty.Access.WRITE_ONLY)
private String previousLink;
+ /** Creates an instance of TagProperties class. */
+ public TagProperties() {
+ }
+
/**
* Get the tags property: A list of Tag.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
index 2cd3f869d8e8a..39b9d12741000 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
@@ -6,17 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Tag;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** A resource listing all tags. */
@Fluent
public final class TagsResultInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsResultInner.class);
-
/*
* The properties of the tag.
*/
@@ -24,13 +20,16 @@ public final class TagsResultInner extends ProxyResource {
private TagProperties 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.
+ * 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.
*/
@JsonProperty(value = "eTag")
private String etag;
+ /** Creates an instance of TagsResultInner class. */
+ public TagsResultInner() {
+ }
+
/**
* Get the innerProperties property: The properties of the tag.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
index 97647be02c10a..e7b8394c0b8cb 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
@@ -6,10 +6,8 @@
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.LegacyUsageDetail;
import com.azure.resourcemanager.consumption.models.ModernUsageDetail;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
@@ -30,8 +28,6 @@
})
@Immutable
public class UsageDetailInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageDetailInner.class);
-
/*
* The etag for the resource.
*/
@@ -45,6 +41,10 @@ public class UsageDetailInner extends ProxyResource {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
+ /** Creates an instance of UsageDetailInner class. */
+ public UsageDetailInner() {
+ }
+
/**
* Get the etag property: The etag for the resource.
*
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
index c241892a5f74d..9303dd348a660 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
@@ -21,15 +21,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.AggregatedCostsClient;
import com.azure.resourcemanager.consumption.fluent.models.ManagementGroupAggregatedCostResultInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in AggregatedCostsClient. */
public final class AggregatedCostsClientImpl implements AggregatedCostsClient {
- private final ClientLogger logger = new ClientLogger(AggregatedCostsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final AggregatedCostsService service;
@@ -53,11 +50,10 @@ public final class AggregatedCostsClientImpl implements AggregatedCostsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface AggregatedCostsService {
+ public interface AggregatedCostsService {
@Headers({"Content-Type: application/json"})
@Get(
- "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption"
- + "/aggregatedcost")
+ "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getByManagementGroup(
@@ -70,8 +66,7 @@ Mono> getByManagementGroup(
@Headers({"Content-Type: application/json"})
@Get(
- "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing"
- + "/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost")
+ "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getForBillingPeriodByManagementGroup(
@@ -93,7 +88,8 @@ Mono> getForBillingPeriodByMa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByManagementGroupWithResponseAsync(
@@ -134,7 +130,8 @@ private Mono> getByManagement
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByManagementGroupWithResponseAsync(
@@ -160,83 +157,50 @@ private Mono> getByManagement
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
- * or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByManagementGroupAsync(
- String managementGroupId, String filter) {
- return getByManagementGroupWithResponseAsync(managementGroupId, filter)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Provides the aggregate cost of a management group and all child management groups by current billing period.
- *
- * @param managementGroupId Azure Management Group ID.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByManagementGroupAsync(String managementGroupId) {
final String filter = null;
return getByManagementGroupWithResponseAsync(managementGroupId, filter)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
+ * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
+ * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
+ * or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId) {
- final String filter = null;
- return getByManagementGroupAsync(managementGroupId, filter).block();
+ public Response getByManagementGroupWithResponse(
+ String managementGroupId, String filter, Context context) {
+ return getByManagementGroupWithResponseAsync(managementGroupId, filter, context).block();
}
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
* @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or',
- * or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a management group aggregated cost resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByManagementGroupWithResponse(
- String managementGroupId, String filter, Context context) {
- return getByManagementGroupWithResponseAsync(managementGroupId, filter, context).block();
+ public ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId) {
+ final String filter = null;
+ return getByManagementGroupWithResponse(managementGroupId, filter, Context.NONE).getValue();
}
/**
@@ -247,7 +211,8 @@ public Response getByManagementGroupWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>
@@ -290,7 +255,8 @@ public Response getByManagementGroupWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>
@@ -330,20 +296,13 @@ public Response getByManagementGroupWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getForBillingPeriodByManagementGroupAsync(
String managementGroupId, String billingPeriodName) {
return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -351,15 +310,17 @@ private Mono getForBillingPeriodByMana
*
* @param managementGroupId Azure Management Group ID.
* @param billingPeriodName Billing Period Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
+ * @return a management group aggregated cost resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
- String managementGroupId, String billingPeriodName) {
- return getForBillingPeriodByManagementGroupAsync(managementGroupId, billingPeriodName).block();
+ public Response getForBillingPeriodByManagementGroupWithResponse(
+ String managementGroupId, String billingPeriodName, Context context) {
+ return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName, context)
+ .block();
}
/**
@@ -367,16 +328,15 @@ public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementG
*
* @param managementGroupId Azure Management Group ID.
* @param billingPeriodName Billing Period Name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a management group aggregated cost resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getForBillingPeriodByManagementGroupWithResponse(
- String managementGroupId, String billingPeriodName, Context context) {
- return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName, context)
- .block();
+ public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName) {
+ return getForBillingPeriodByManagementGroupWithResponse(managementGroupId, billingPeriodName, Context.NONE)
+ .getValue();
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
index 9465438065536..24c0cc78411a4 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
@@ -12,10 +12,9 @@
import com.azure.resourcemanager.consumption.fluent.models.ManagementGroupAggregatedCostResultInner;
import com.azure.resourcemanager.consumption.models.AggregatedCosts;
import com.azure.resourcemanager.consumption.models.ManagementGroupAggregatedCostResult;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class AggregatedCostsImpl implements AggregatedCosts {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AggregatedCostsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(AggregatedCostsImpl.class);
private final AggregatedCostsClient innerClient;
@@ -27,15 +26,6 @@ public AggregatedCostsImpl(
this.serviceManager = serviceManager;
}
- public ManagementGroupAggregatedCostResult getByManagementGroup(String managementGroupId) {
- ManagementGroupAggregatedCostResultInner inner = this.serviceClient().getByManagementGroup(managementGroupId);
- if (inner != null) {
- return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByManagementGroupWithResponse(
String managementGroupId, String filter, Context context) {
Response inner =
@@ -51,10 +41,8 @@ public Response getByManagementGroupWithRes
}
}
- public ManagementGroupAggregatedCostResult getForBillingPeriodByManagementGroup(
- String managementGroupId, String billingPeriodName) {
- ManagementGroupAggregatedCostResultInner inner =
- this.serviceClient().getForBillingPeriodByManagementGroup(managementGroupId, billingPeriodName);
+ public ManagementGroupAggregatedCostResult getByManagementGroup(String managementGroupId) {
+ ManagementGroupAggregatedCostResultInner inner = this.serviceClient().getByManagementGroup(managementGroupId);
if (inner != null) {
return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
} else {
@@ -79,6 +67,17 @@ public Response getForBillingPeriodByManage
}
}
+ public ManagementGroupAggregatedCostResult getForBillingPeriodByManagementGroup(
+ String managementGroupId, String billingPeriodName) {
+ ManagementGroupAggregatedCostResultInner inner =
+ this.serviceClient().getForBillingPeriodByManagementGroup(managementGroupId, billingPeriodName);
+ if (inner != null) {
+ return new ManagementGroupAggregatedCostResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private AggregatedCostsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
index 2f73babf5e6d9..5dfef26a7afc3 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
@@ -101,6 +101,10 @@ public Boolean priceHidden() {
return this.innerModel().priceHidden();
}
+ public BigDecimal overageRefund() {
+ return this.innerModel().overageRefund();
+ }
+
public List newPurchasesDetails() {
List inner = this.innerModel().newPurchasesDetails();
if (inner != null) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
index 142543f3d1a72..5623d7930e6df 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
@@ -21,15 +21,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.BalancesClient;
import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in BalancesClient. */
public final class BalancesClientImpl implements BalancesClient {
- private final ClientLogger logger = new ClientLogger(BalancesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final BalancesService service;
@@ -52,7 +49,7 @@ public final class BalancesClientImpl implements BalancesClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface BalancesService {
+ public interface BalancesService {
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances")
@ExpectedResponses({200})
@@ -66,8 +63,7 @@ Mono> getByBillingAccount(
@Headers({"Content-Type: application/json"})
@Get(
- "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}"
- + "/providers/Microsoft.Consumption/balances")
+ "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getForBillingPeriodByBillingAccount(
@@ -87,7 +83,8 @@ Mono> getForBillingPeriodByBillingAccount(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByBillingAccountWithResponseAsync(String billingAccountId) {
@@ -120,7 +117,8 @@ private Mono> getByBillingAccountWithResponseAsync(String
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByBillingAccountWithResponseAsync(
@@ -150,19 +148,11 @@ private Mono> getByBillingAccountWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByBillingAccountAsync(String billingAccountId) {
- return getByBillingAccountWithResponseAsync(billingAccountId)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return getByBillingAccountWithResponseAsync(billingAccountId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -170,14 +160,15 @@ private Mono getByBillingAccountAsync(String billingAccountId) {
* later.
*
* @param billingAccountId BillingAccount ID.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId.
+ * @return the balances for a scope by billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public BalanceInner getByBillingAccount(String billingAccountId) {
- return getByBillingAccountAsync(billingAccountId).block();
+ public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
+ return getByBillingAccountWithResponseAsync(billingAccountId, context).block();
}
/**
@@ -185,15 +176,14 @@ public BalanceInner getByBillingAccount(String billingAccountId) {
* later.
*
* @param billingAccountId BillingAccount ID.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the balances for a scope by billingAccountId.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
- return getByBillingAccountWithResponseAsync(billingAccountId, context).block();
+ public BalanceInner getByBillingAccount(String billingAccountId) {
+ return getByBillingAccountWithResponse(billingAccountId, Context.NONE).getValue();
}
/**
@@ -205,7 +195,8 @@ public Response getByBillingAccountWithResponse(String billingAcco
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(
@@ -249,7 +240,8 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(
@@ -289,20 +281,13 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getForBillingPeriodByBillingAccountAsync(
String billingAccountId, String billingPeriodName) {
return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -311,14 +296,17 @@ private Mono getForBillingPeriodByBillingAccountAsync(
*
* @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId.
+ * @return the balances for a scope by billing period and billingAccountId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
- return getForBillingPeriodByBillingAccountAsync(billingAccountId, billingPeriodName).block();
+ public Response getForBillingPeriodByBillingAccountWithResponse(
+ String billingAccountId, String billingPeriodName, Context context) {
+ return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName, context)
+ .block();
}
/**
@@ -327,16 +315,14 @@ public BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId,
*
* @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the balances for a scope by billing period and billingAccountId.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getForBillingPeriodByBillingAccountWithResponse(
- String billingAccountId, String billingPeriodName, Context context) {
- return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName, context)
- .block();
+ public BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
+ return getForBillingPeriodByBillingAccountWithResponse(billingAccountId, billingPeriodName, Context.NONE)
+ .getValue();
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
index e1652cddc7cab..f106b96986d71 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
@@ -12,10 +12,9 @@
import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
import com.azure.resourcemanager.consumption.models.Balance;
import com.azure.resourcemanager.consumption.models.Balances;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class BalancesImpl implements Balances {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BalancesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(BalancesImpl.class);
private final BalancesClient innerClient;
@@ -27,15 +26,6 @@ public BalancesImpl(
this.serviceManager = serviceManager;
}
- public Balance getByBillingAccount(String billingAccountId) {
- BalanceInner inner = this.serviceClient().getByBillingAccount(billingAccountId);
- if (inner != null) {
- return new BalanceImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
Response inner = this.serviceClient().getByBillingAccountWithResponse(billingAccountId, context);
if (inner != null) {
@@ -49,9 +39,8 @@ public Response getByBillingAccountWithResponse(String billingAccountId
}
}
- public Balance getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
- BalanceInner inner =
- this.serviceClient().getForBillingPeriodByBillingAccount(billingAccountId, billingPeriodName);
+ public Balance getByBillingAccount(String billingAccountId) {
+ BalanceInner inner = this.serviceClient().getByBillingAccount(billingAccountId);
if (inner != null) {
return new BalanceImpl(inner, this.manager());
} else {
@@ -76,6 +65,16 @@ public Response getForBillingPeriodByBillingAccountWithResponse(
}
}
+ public Balance getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
+ BalanceInner inner =
+ this.serviceClient().getForBillingPeriodByBillingAccount(billingAccountId, billingPeriodName);
+ if (inner != null) {
+ return new BalanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private BalancesClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
index d1175bb8bab16..6c0f403f7c207 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
@@ -28,7 +28,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.BudgetsClient;
import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
import com.azure.resourcemanager.consumption.models.BudgetsListResult;
@@ -36,8 +35,6 @@
/** An instance of this class provides access to all the operations defined in BudgetsClient. */
public final class BudgetsClientImpl implements BudgetsClient {
- private final ClientLogger logger = new ClientLogger(BudgetsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final BudgetsService service;
@@ -60,7 +57,7 @@ public final class BudgetsClientImpl implements BudgetsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface BudgetsService {
+ public interface BudgetsService {
@Headers({"Content-Type: application/json"})
@Get("/{scope}/providers/Microsoft.Consumption/budgets")
@ExpectedResponses({200})
@@ -133,12 +130,12 @@ Mono> listNext(
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String scope) {
@@ -180,13 +177,13 @@ private Mono> listSinglePageAsync(String scope) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String scope, Context context) {
@@ -227,12 +224,12 @@ private Mono> listSinglePageAsync(String scope, Conte
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope) {
@@ -252,13 +249,13 @@ private PagedFlux listAsync(String scope) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String scope, Context context) {
@@ -279,12 +276,12 @@ private PagedFlux listAsync(String scope, Context context) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String scope) {
@@ -304,13 +301,13 @@ public PagedIterable list(String scope) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String scope, Context context) {
@@ -330,13 +327,14 @@ public PagedIterable list(String scope, Context context) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the budget for the scope by budget name.
+ * @return the budget for the scope by budget name along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String scope, String budgetName) {
@@ -375,14 +373,15 @@ private Mono> getWithResponseAsync(String scope, String bu
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the budget for the scope by budget name.
+ * @return the budget for the scope by budget name along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String scope, String budgetName, Context context) {
@@ -416,25 +415,17 @@ private Mono> getWithResponseAsync(String scope, String bu
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the budget for the scope by budget name.
+ * @return the budget for the scope by budget name on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String scope, String budgetName) {
- return getWithResponseAsync(scope, budgetName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return getWithResponseAsync(scope, budgetName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -450,17 +441,18 @@ private Mono getAsync(String scope, String budgetName) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the budget for the scope by budget name.
+ * @return the budget for the scope by budget name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public BudgetInner get(String scope, String budgetName) {
- return getAsync(scope, budgetName).block();
+ public Response getWithResponse(String scope, String budgetName, Context context) {
+ return getWithResponseAsync(scope, budgetName, context).block();
}
/**
@@ -476,18 +468,17 @@ public BudgetInner get(String scope, String budgetName) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the budget for the scope by budget name.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String scope, String budgetName, Context context) {
- return getWithResponseAsync(scope, budgetName, context).block();
+ public BudgetInner get(String scope, String budgetName) {
+ return getWithResponse(scope, budgetName, Context.NONE).getValue();
}
/**
@@ -505,14 +496,14 @@ public Response getWithResponse(String scope, String budgetName, Co
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource.
+ * @return a budget resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -565,7 +556,7 @@ private Mono> createOrUpdateWithResponseAsync(
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
@@ -573,7 +564,7 @@ private Mono> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource.
+ * @return a budget resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -617,26 +608,19 @@ private Mono> createOrUpdateWithResponseAsync(
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource.
+ * @return a budget resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(String scope, String budgetName, BudgetInner parameters) {
return createOrUpdateWithResponseAsync(scope, budgetName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -654,18 +638,20 @@ private Mono createOrUpdateAsync(String scope, String budgetName, B
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource.
+ * @return a budget resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters) {
- return createOrUpdateAsync(scope, budgetName, parameters).block();
+ public Response createOrUpdateWithResponse(
+ String scope, String budgetName, BudgetInner parameters, Context context) {
+ return createOrUpdateWithResponseAsync(scope, budgetName, parameters, context).block();
}
/**
@@ -683,20 +669,18 @@ public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner p
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a budget resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(
- String scope, String budgetName, BudgetInner parameters, Context context) {
- return createOrUpdateWithResponseAsync(scope, budgetName, parameters, context).block();
+ public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters) {
+ return createOrUpdateWithResponse(scope, budgetName, parameters, Context.NONE).getValue();
}
/**
@@ -712,13 +696,13 @@ public Response createOrUpdateWithResponse(
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String scope, String budgetName) {
@@ -757,14 +741,14 @@ private Mono> deleteWithResponseAsync(String scope, String budget
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String scope, String budgetName, Context context) {
@@ -799,17 +783,17 @@ private Mono> deleteWithResponseAsync(String scope, String budget
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String scope, String budgetName) {
- return deleteWithResponseAsync(scope, budgetName).flatMap((Response res) -> Mono.empty());
+ return deleteWithResponseAsync(scope, budgetName).flatMap(ignored -> Mono.empty());
}
/**
@@ -825,16 +809,18 @@ private Mono deleteAsync(String scope, String budgetName) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String scope, String budgetName) {
- deleteAsync(scope, budgetName).block();
+ public Response deleteWithResponse(String scope, String budgetName, Context context) {
+ return deleteWithResponseAsync(scope, budgetName, context).block();
}
/**
@@ -850,28 +836,27 @@ public void delete(String scope, String budgetName) {
* Management Group scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
* invoiceSection scope.
* @param budgetName Budget Name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(String scope, String budgetName, Context context) {
- return deleteWithResponseAsync(scope, budgetName, context).block();
+ public void delete(String scope, String budgetName) {
+ deleteWithResponse(scope, budgetName, Context.NONE);
}
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -902,12 +887,13 @@ private Mono> listNextSinglePageAsync(String nextLink
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
index 533b9307c6445..7fbede8d3d939 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
import com.azure.resourcemanager.consumption.models.Budget;
import com.azure.resourcemanager.consumption.models.Budgets;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class BudgetsImpl implements Budgets {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BudgetsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(BudgetsImpl.class);
private final BudgetsClient innerClient;
@@ -38,15 +37,6 @@ public PagedIterable list(String scope, Context context) {
return Utils.mapPage(inner, inner1 -> new BudgetImpl(inner1, this.manager()));
}
- public Budget get(String scope, String budgetName) {
- BudgetInner inner = this.serviceClient().get(scope, budgetName);
- if (inner != null) {
- return new BudgetImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(String scope, String budgetName, Context context) {
Response inner = this.serviceClient().getWithResponse(scope, budgetName, context);
if (inner != null) {
@@ -60,21 +50,30 @@ public Response getWithResponse(String scope, String budgetName, Context
}
}
- public void deleteByResourceGroup(String scope, String budgetName) {
- this.serviceClient().delete(scope, budgetName);
+ public Budget get(String scope, String budgetName) {
+ BudgetInner inner = this.serviceClient().get(scope, budgetName);
+ if (inner != null) {
+ return new BudgetImpl(inner, this.manager());
+ } else {
+ return null;
+ }
}
- public Response deleteWithResponse(String scope, String budgetName, Context context) {
+ public Response deleteByResourceGroupWithResponse(String scope, String budgetName, Context context) {
return this.serviceClient().deleteWithResponse(scope, budgetName, context);
}
+ public void deleteByResourceGroup(String scope, String budgetName) {
+ this.serviceClient().delete(scope, budgetName);
+ }
+
public Budget getById(String id) {
String scope =
Utils
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
if (scope == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
@@ -84,7 +83,7 @@ public Budget getById(String id) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
if (budgetName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
@@ -98,7 +97,7 @@ public Response getByIdWithResponse(String id, Context context) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
if (scope == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
@@ -108,7 +107,7 @@ public Response getByIdWithResponse(String id, Context context) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
if (budgetName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
@@ -122,7 +121,7 @@ public void deleteById(String id) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
if (scope == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
@@ -132,12 +131,12 @@ public void deleteById(String id) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
if (budgetName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
}
- this.deleteWithResponse(scope, budgetName, Context.NONE);
+ this.deleteByResourceGroupWithResponse(scope, budgetName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
@@ -146,7 +145,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
if (scope == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
@@ -156,12 +155,12 @@ public Response deleteByIdWithResponse(String id, Context context) {
.getValueFromIdByParameterName(
id, "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
if (budgetName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
}
- return this.deleteWithResponse(scope, budgetName, context);
+ return this.deleteByResourceGroupWithResponse(scope, budgetName, context);
}
private BudgetsClient serviceClient() {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
index 7a1bc33418ff3..f70ce414b7490 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
@@ -21,15 +21,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.ChargesClient;
import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ChargesClient. */
public final class ChargesClientImpl implements ChargesClient {
- private final ClientLogger logger = new ClientLogger(ChargesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ChargesService service;
@@ -52,7 +49,7 @@ public final class ChargesClientImpl implements ChargesClient {
*/
@Host("{$host}")
@ServiceInterface(name = "ConsumptionManagemen")
- private interface ChargesService {
+ public interface ChargesService {
@Headers({"Content-Type: application/json"})
@Get("/{scope}/providers/Microsoft.Consumption/charges")
@ExpectedResponses({200})
@@ -84,9 +81,9 @@ Mono> list(
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @param startDate Start date.
* @param endDate End date.
@@ -99,7 +96,7 @@ Mono> list(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary.
+ * @return result of listing charge summary along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync(
@@ -146,9 +143,9 @@ private Mono> listWithResponseAsync(
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @param startDate Start date.
* @param endDate End date.
@@ -162,7 +159,7 @@ private Mono> listWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary.
+ * @return result of listing charge summary along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync(
@@ -206,60 +203,14 @@ private Mono> listWithResponseAsync(
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
- * partners.
- * @param startDate Start date.
- * @param endDate End date.
- * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
- * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
- * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
- * properties/invoiceSectionId.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono listAsync(
- String scope, String startDate, String endDate, String filter, String apply) {
- return listWithResponseAsync(scope, startDate, endDate, filter, apply)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Lists the charges based for the defined scope.
- *
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the
- * scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing
- * period at department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
- * for billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary.
+ * @return result of listing charge summary on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listAsync(String scope) {
@@ -268,14 +219,7 @@ private Mono listAsync(String scope) {
final String filter = null;
final String apply = null;
return listWithResponseAsync(scope, startDate, endDate, filter, apply)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -293,22 +237,28 @@ private Mono listAsync(String scope) {
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
+ * @param startDate Start date.
+ * @param endDate End date.
+ * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
+ * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
+ * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
+ * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
+ * properties/invoiceSectionId.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary.
+ * @return result of listing charge summary along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ChargesListResultInner list(String scope) {
- final String startDate = null;
- final String endDate = null;
- final String filter = null;
- final String apply = null;
- return listAsync(scope, startDate, endDate, filter, apply).block();
+ public Response listWithResponse(
+ String scope, String startDate, String endDate, String filter, String apply, Context context) {
+ return listWithResponseAsync(scope, startDate, endDate, filter, apply, context).block();
}
/**
@@ -326,27 +276,21 @@ public ChargesListResultInner list(String scope) {
* for billingAccount scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
* billingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
- * @param startDate Start date.
- * @param endDate End date.
- * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
- * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
- * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
- * properties/invoiceSectionId.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of listing charge summary.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response listWithResponse(
- String scope, String startDate, String endDate, String filter, String apply, Context context) {
- return listWithResponseAsync(scope, startDate, endDate, filter, apply, context).block();
+ public ChargesListResultInner list(String scope) {
+ final String startDate = null;
+ final String endDate = null;
+ final String filter = null;
+ final String apply = null;
+ return listWithResponse(scope, startDate, endDate, filter, apply, Context.NONE).getValue();
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
index f698da5201545..ac7878938b316 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
@@ -12,10 +12,9 @@
import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
import com.azure.resourcemanager.consumption.models.Charges;
import com.azure.resourcemanager.consumption.models.ChargesListResult;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class ChargesImpl implements Charges {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ChargesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(ChargesImpl.class);
private final ChargesClient innerClient;
@@ -27,15 +26,6 @@ public ChargesImpl(
this.serviceManager = serviceManager;
}
- public ChargesListResult list(String scope) {
- ChargesListResultInner inner = this.serviceClient().list(scope);
- if (inner != null) {
- return new ChargesListResultImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response listWithResponse(
String scope, String startDate, String endDate, String filter, String apply, Context context) {
Response inner =
@@ -51,6 +41,15 @@ public Response listWithResponse(
}
}
+ public ChargesListResult list(String scope) {
+ ChargesListResultInner inner = this.serviceClient().list(scope);
+ if (inner != null) {
+ return new ChargesListResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private ChargesClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
index efd5a406aff68..1eab26e15a0e5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public ConsumptionManagementClientBuilder environment(AzureEnvironment environme
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the ConsumptionManagementClientBuilder.
*/
- public ConsumptionManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public ConsumptionManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the ConsumptionManagementClientBuilder.
*/
- public ConsumptionManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public ConsumptionManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,27 +119,26 @@ public ConsumptionManagementClientBuilder serializerAdapter(SerializerAdapter se
* @return an instance of ConsumptionManagementClientImpl.
*/
public ConsumptionManagementClientImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
ConsumptionManagementClientImpl client =
new ConsumptionManagementClientImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java
index d4a20bf01a4c4..f14e15f9283aa 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -45,15 +46,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the ConsumptionManagementClientImpl type. */
@ServiceClient(builder = ConsumptionManagementClientBuilder.class)
public final class ConsumptionManagementClientImpl implements ConsumptionManagementClient {
- private final ClientLogger logger = new ClientLogger(ConsumptionManagementClientImpl.class);
-
/** Azure Subscription ID. */
private final String subscriptionId;
@@ -352,7 +350,7 @@ public CreditsClient getCredits() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-10-01";
+ this.apiVersion = "2023-05-01";
this.usageDetails = new UsageDetailsClientImpl(this);
this.marketplaces = new MarketplacesClientImpl(this);
this.budgets = new BudgetsClientImpl(this);
@@ -388,10 +386,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry