java.lang.Object
com.azure.resourcemanager.billingbenefits.models.Price
com.azure.resourcemanager.billingbenefits.models.Commitment

public final class Commitment extends Price
Commitment towards the benefit.
  • Constructor Details

    • Commitment

      public Commitment()
      Creates an instance of Commitment class.
  • Method Details

    • grain

      public CommitmentGrain grain()
      Get the grain property: Commitment grain.
      Returns:
      the grain value.
    • withGrain

      public Commitment withGrain(CommitmentGrain grain)
      Set the grain property: Commitment grain.
      Parameters:
      grain - the grain value to set.
      Returns:
      the Commitment object itself.
    • withCurrencyCode

      public Commitment withCurrencyCode(String currencyCode)
      Set the currencyCode property: The ISO 4217 3-letter currency code for the currency used by this purchase record.
      Overrides:
      withCurrencyCode in class Price
      Parameters:
      currencyCode - the currencyCode value to set.
      Returns:
      the Price object itself.
    • withAmount

      public Commitment withAmount(Double amount)
      Set the amount property: The amount property.
      Overrides:
      withAmount in class Price
      Parameters:
      amount - the amount value to set.
      Returns:
      the Price object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class Price
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.