Skip to content

Commit

Permalink
CodeGen from PR 13967 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Cost Management: Reservation Recommendations API: Add multiple missing properties in specs (Azure#13967)

* added totalCost, properties.resourceType, properties.subscriptionId, and eTag to various RiRec dfinitions

* moving eTag  property to right place

* remove duplicate description
  • Loading branch information
SDKAuto committed Apr 21, 2021
1 parent 2217368 commit 9951eec
Show file tree
Hide file tree
Showing 41 changed files with 325 additions and 1,042 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2021-04-21)

- 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-2019-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.1 (2021-04-13)

Expand Down
4 changes: 2 additions & 2 deletions sdk/consumption/azure-resourcemanager-consumption/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-2019-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-2019-11. 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

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-consumption</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
2 changes: 1 addition & 1 deletion sdk/consumption/azure-resourcemanager-consumption/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Consumption Management</name>
<description>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-2019-10.</description>
<description>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-2019-11.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,27 @@ public interface CreditsClient {
/**
* The credit summary by billingAccountId and billingProfileId.
*
* @param scope The scope associated with credits operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
* Billing Profile scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @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 a credit summary resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
CreditSummaryInner get(String scope);
CreditSummaryInner get(String billingAccountId, String billingProfileId);

/**
* The credit summary by billingAccountId and billingProfileId.
*
* @param scope The scope associated with credits operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
* Billing Profile scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @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<CreditSummaryInner> getWithResponse(String scope, Context context);
Response<CreditSummaryInner> getWithResponse(String billingAccountId, String billingProfileId, Context context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,33 @@ public interface EventsOperationsClient {
/**
* Lists the events by billingAccountId and billingProfileId for given start and end date.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @param startDate Start date.
* @param endDate End date.
* @param scope The scope associated with events operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
* Billing Profile scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of listing event summary.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<EventSummaryInner> list(String startDate, String endDate, String scope);
PagedIterable<EventSummaryInner> list(
String billingAccountId, String billingProfileId, String startDate, String endDate);

/**
* Lists the events by billingAccountId and billingProfileId for given start and end date.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
* @param startDate Start date.
* @param endDate End date.
* @param scope The scope associated with events operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
* Billing Profile scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<EventSummaryInner> list(String startDate, String endDate, String scope, Context context);
PagedIterable<EventSummaryInner> list(
String billingAccountId, String billingProfileId, String startDate, String endDate, Context context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,27 @@ public interface LotsOperationsClient {
/**
* Lists the lots by billingAccountId and billingProfileId.
*
* @param scope The scope associated with Lots operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
* Billing Profile scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @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.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<LotSummaryInner> list(String scope);
PagedIterable<LotSummaryInner> list(String billingAccountId, String billingProfileId);

/**
* Lists the lots by billingAccountId and billingProfileId.
*
* @param scope The scope associated with Lots operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
* Billing Profile scope, and
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
* partners.
* @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 result of listing lot summary.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<LotSummaryInner> list(String scope, Context context);
PagedIterable<LotSummaryInner> list(String billingAccountId, String billingProfileId, Context context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@
/** An instance of this class provides access to all the operations defined in PriceSheetsClient. */
public interface PriceSheetsClient {
/**
* Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or
* later.
* Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
*
* @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.
* @return the price sheet for a subscription.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
PriceSheetResultInner get();

/**
* Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or
* later.
* 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.
Expand All @@ -37,7 +35,7 @@ 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 scope by subscriptionId.
* @return the price sheet for a subscription.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<PriceSheetResultInner> getWithResponse(String expand, String skiptoken, Integer top, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public interface ReservationRecommendationDetailsClient {
/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
*
* @param billingScope The scope associated with reservation recommendation details operations. This includes
* @param scope 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 scope1 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.
Expand All @@ -39,18 +39,18 @@ public interface ReservationRecommendationDetailsClient {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ReservationRecommendationDetailsModelInner get(
String billingScope, Scope scope, String region, Term term, LookBackPeriod lookBackPeriod, String product);
String scope, Scope scope1, String region, Term term, LookBackPeriod lookBackPeriod, String product);

/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
*
* @param billingScope The scope associated with reservation recommendation details operations. This includes
* @param scope 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 scope1 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.
Expand All @@ -64,8 +64,8 @@ ReservationRecommendationDetailsModelInner get(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ReservationRecommendationDetailsModelInner> getWithResponse(
String billingScope,
Scope scope,
String scope,
Scope scope1,
String region,
Term term,
LookBackPeriod lookBackPeriod,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
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;
import java.util.Map;
Expand All @@ -21,18 +20,6 @@
public class CreditSummaryInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryInner.class);

/*
* Credit Currency
*/
@JsonProperty(value = "properties.creditCurrency", access = JsonProperty.Access.WRITE_ONLY)
private String creditCurrency;

/*
* Billing Currency.
*/
@JsonProperty(value = "properties.billingCurrency", access = JsonProperty.Access.WRITE_ONLY)
private String billingCurrency;

/*
* Summary of balances associated with this credit summary.
*/
Expand All @@ -57,12 +44,6 @@ public class CreditSummaryInner extends ProxyResource {
@JsonProperty(value = "properties.pendingEligibleCharges", access = JsonProperty.Access.WRITE_ONLY)
private Amount pendingEligibleCharges;

/*
* Reseller details.
*/
@JsonProperty(value = "properties.reseller", access = JsonProperty.Access.WRITE_ONLY)
private Reseller reseller;

/*
* Resource etag.
*/
Expand All @@ -75,24 +56,6 @@ public class CreditSummaryInner extends ProxyResource {
@JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
private Map<String, String> tags;

/**
* Get the creditCurrency property: Credit Currency.
*
* @return the creditCurrency value.
*/
public String creditCurrency() {
return this.creditCurrency;
}

/**
* Get the billingCurrency property: Billing Currency.
*
* @return the billingCurrency value.
*/
public String billingCurrency() {
return this.billingCurrency;
}

/**
* Get the balanceSummary property: Summary of balances associated with this credit summary.
*
Expand Down Expand Up @@ -129,15 +92,6 @@ public Amount pendingEligibleCharges() {
return this.pendingEligibleCharges;
}

/**
* Get the reseller property: Reseller details.
*
* @return the reseller value.
*/
public Reseller reseller() {
return this.reseller;
}

/**
* Get the etag property: Resource etag.
*
Expand Down Expand Up @@ -174,8 +128,5 @@ public void validate() {
if (pendingEligibleCharges() != null) {
pendingEligibleCharges().validate();
}
if (reseller() != null) {
reseller().validate();
}
}
}
Loading

0 comments on commit 9951eec

Please sign in to comment.