Class SharedScopeBenefitRecommendationProperties
java.lang.Object
com.azure.resourcemanager.costmanagement.models.BenefitRecommendationProperties
com.azure.resourcemanager.costmanagement.models.SharedScopeBenefitRecommendationProperties
public final class SharedScopeBenefitRecommendationProperties
extends BenefitRecommendationProperties
The properties of the benefit recommendation when scope is 'Shared'.
-
Constructor Summary
ConstructorDescriptionCreates an instance of SharedScopeBenefitRecommendationProperties class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
validate()
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
-
SharedScopeBenefitRecommendationProperties
public SharedScopeBenefitRecommendationProperties()Creates an instance of SharedScopeBenefitRecommendationProperties class.
-
-
Method Details
-
withLookBackPeriod
Set the lookBackPeriod property: The number of days of usage evaluated for computing the recommendations.- Overrides:
withLookBackPeriod
in 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:
withUsage
in 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:
withTerm
in classBenefitRecommendationProperties
- Parameters:
term
- the term value to set.- Returns:
- the BenefitRecommendationProperties object itself.
-
withCommitmentGranularity
public SharedScopeBenefitRecommendationProperties withCommitmentGranularity(Grain commitmentGranularity) Set the commitmentGranularity property: Grain of the proposed commitment amount. Supported values: 'Hourly'.- Overrides:
withCommitmentGranularity
in classBenefitRecommendationProperties
- Parameters:
commitmentGranularity
- the commitmentGranularity value to set.- Returns:
- the BenefitRecommendationProperties object itself.
-
withRecommendationDetails
public SharedScopeBenefitRecommendationProperties withRecommendationDetails(AllSavingsBenefitDetails recommendationDetails) Set the recommendationDetails property: The details of the proposed recommendation.- Overrides:
withRecommendationDetails
in classBenefitRecommendationProperties
- Parameters:
recommendationDetails
- the recommendationDetails value to set.- Returns:
- the BenefitRecommendationProperties object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classBenefitRecommendationProperties
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-