Class SingleScopeBenefitRecommendationProperties
java.lang.Object
com.azure.resourcemanager.costmanagement.models.BenefitRecommendationProperties
com.azure.resourcemanager.costmanagement.models.SingleScopeBenefitRecommendationProperties
public final class SingleScopeBenefitRecommendationProperties
extends BenefitRecommendationProperties
The properties of the benefit recommendations when scope is 'Single'.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SingleScopeBenefitRecommendationProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the resourceGroup property: The resource group that this single scope recommendation is for.Get the subscriptionId property: The subscription ID that this single scope recommendation is for.voidvalidate()Validates the instance.withCommitmentGranularity(Grain commitmentGranularity) Set the commitmentGranularity property: Grain of the proposed commitment amount.withLookBackPeriod(LookBackPeriod lookBackPeriod) Set the lookBackPeriod property: The number of days of usage evaluated for computing the recommendations.withRecommendationDetails(AllSavingsBenefitDetails recommendationDetails) Set the recommendationDetails property: The details of the proposed recommendation.Set the term property: Term period of the benefit.Set the usage property: On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.Methods inherited from class com.azure.resourcemanager.costmanagement.models.BenefitRecommendationProperties
allRecommendationDetails, armSkuName, commitmentGranularity, costWithoutBenefit, currencyCode, firstConsumptionDate, lastConsumptionDate, lookBackPeriod, recommendationDetails, term, totalHours, usage
-
Constructor Details
-
SingleScopeBenefitRecommendationProperties
public SingleScopeBenefitRecommendationProperties()Creates an instance of SingleScopeBenefitRecommendationProperties class.
-
-
Method Details
-
subscriptionId
Get the subscriptionId property: The subscription ID that this single scope recommendation is for. Applicable only if recommendation is for 'Single' scope.- Returns:
- the subscriptionId value.
-
resourceGroup
Get the resourceGroup property: The resource group that this single scope recommendation is for. Applicable only if recommendation is for 'Single' scope and 'ResourceGroup' request scope.- Returns:
- the resourceGroup value.
-
withLookBackPeriod
Set the lookBackPeriod property: The number of days of usage evaluated for computing the recommendations.- Overrides:
withLookBackPeriodin classBenefitRecommendationProperties- Parameters:
lookBackPeriod- the lookBackPeriod value to set.- Returns:
- the BenefitRecommendationProperties object itself.
-
withUsage
Set the usage property: On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.- Overrides:
withUsagein classBenefitRecommendationProperties- Parameters:
usage- the usage value to set.- Returns:
- the BenefitRecommendationProperties object itself.
-
withTerm
Set the term property: Term period of the benefit. For example, P1Y or P3Y.- Overrides:
withTermin classBenefitRecommendationProperties- Parameters:
term- the term value to set.- Returns:
- the BenefitRecommendationProperties object itself.
-
withCommitmentGranularity
public SingleScopeBenefitRecommendationProperties withCommitmentGranularity(Grain commitmentGranularity) Set the commitmentGranularity property: Grain of the proposed commitment amount. Supported values: 'Hourly'.- Overrides:
withCommitmentGranularityin classBenefitRecommendationProperties- Parameters:
commitmentGranularity- the commitmentGranularity value to set.- Returns:
- the BenefitRecommendationProperties object itself.
-
withRecommendationDetails
public SingleScopeBenefitRecommendationProperties withRecommendationDetails(AllSavingsBenefitDetails recommendationDetails) Set the recommendationDetails property: The details of the proposed recommendation.- Overrides:
withRecommendationDetailsin classBenefitRecommendationProperties- Parameters:
recommendationDetails- the recommendationDetails value to set.- Returns:
- the BenefitRecommendationProperties object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classBenefitRecommendationProperties- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-