Record Class CommercialTerms

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spec.CommercialTerms
Record Components:
currency - ISO 4217 code budgets are stated in and totals are compared in; may be null (USD)
budgetMaxMonthly - most the design may cost per month, in currency; may be null
budgetMinMonthly - least expected monthly spend, in currency; may be null
term - commitment term to price at; may be null (let the engine compare terms)
annualGrowthRate - expected yearly traffic growth as a fraction (0.25 = 25%); may be null
horizonMonths - how far ahead to project cost and capacity; may be null (12)
exchangeRates - caller-supplied rates that restate prices in other currencies in currency; may be null (nothing is converted). The SDK never fetches or invents a rate.

public record CommercialTerms(String currency, BigDecimal budgetMaxMonthly, BigDecimal budgetMinMonthly, Term term, Double annualGrowthRate, Integer horizonMonths, CommercialTerms.ExchangeRates exchangeRates) extends Record
The commercial frame the design is priced and judged in.
  • Constructor Details

    • CommercialTerms

      public CommercialTerms(String currency, BigDecimal budgetMaxMonthly, BigDecimal budgetMinMonthly, Term term, Double annualGrowthRate, Integer horizonMonths)
      The terms without exchange rates.
      Parameters:
      currency - see the record
      budgetMaxMonthly - see the record
      budgetMinMonthly - see the record
      term - see the record
      annualGrowthRate - see the record
      horizonMonths - see the record
    • CommercialTerms

      public CommercialTerms(String currency, BigDecimal budgetMaxMonthly, BigDecimal budgetMinMonthly, Term term, Double annualGrowthRate, Integer horizonMonths, CommercialTerms.ExchangeRates exchangeRates)
      Creates an instance of a CommercialTerms record class.
      Parameters:
      currency - the value for the currency record component
      budgetMaxMonthly - the value for the budgetMaxMonthly record component
      budgetMinMonthly - the value for the budgetMinMonthly record component
      term - the value for the term record component
      annualGrowthRate - the value for the annualGrowthRate record component
      horizonMonths - the value for the horizonMonths record component
      exchangeRates - the value for the exchangeRates record component
  • Method Details

    • currencyOrDefault

      public String currencyOrDefault()
      Returns:
      the currency to use, USD when unset
    • horizonMonthsOrDefault

      public int horizonMonthsOrDefault()
      Returns:
      the projection horizon in months, 12 when unset
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • currency

      public String currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • budgetMaxMonthly

      public BigDecimal budgetMaxMonthly()
      Returns the value of the budgetMaxMonthly record component.
      Returns:
      the value of the budgetMaxMonthly record component
    • budgetMinMonthly

      public BigDecimal budgetMinMonthly()
      Returns the value of the budgetMinMonthly record component.
      Returns:
      the value of the budgetMinMonthly record component
    • term

      public Term term()
      Returns the value of the term record component.
      Returns:
      the value of the term record component
    • annualGrowthRate

      public Double annualGrowthRate()
      Returns the value of the annualGrowthRate record component.
      Returns:
      the value of the annualGrowthRate record component
    • horizonMonths

      public Integer horizonMonths()
      Returns the value of the horizonMonths record component.
      Returns:
      the value of the horizonMonths record component
    • exchangeRates

      public CommercialTerms.ExchangeRates exchangeRates()
      Returns the value of the exchangeRates record component.
      Returns:
      the value of the exchangeRates record component