Record Class SpecInputs

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.value.SpecInputs
Record Components:
fingerprint - the spec's fingerprint
cloud - the cloud being priced
provider - its provider
region - its region, or null
egressGb - data leaving the cloud per month, GB
bandwidthMbps - the Fabric tier the leg is sized to
metro - the metro, or null
term - the term
assumptions - what was assumed where the spec was silent

public record SpecInputs(String fingerprint, CloudIntent cloud, CloudProviderType provider, String region, double egressGb, int bandwidthMbps, MetroCode metro, Term term, List<String> assumptions) extends Record
The inputs the TCO and savings models take, derived from a DesignSpec (and optionally the portfolio a run chose) the same way the optimiser's RateCardCostModel reads them, so the three price the same thing.
  • cloud: the named cloud, else the first cloud that names a provider;
  • provider, region and monthly egress: that cloud's provider, region and monthlyEgressGb (0 when unset);
  • bandwidth: the sum of bandwidthMbps over the workloads that reach the cloud, rounded up to the Fabric tier (RateCardCostModel.tierFor(int)); 1000 Mbps when no workload is sized (stated as an assumption);
  • metro: the chosen portfolio's metro when it has one; for a larger portfolio its first metro (stated); with no portfolio, the spec's single required metro, else none (metro-agnostic);
  • term: commercial.term, else Term.MONTH_1 (the cost model's default).
  • Constructor Details

  • Method Details

    • derive

      public static SpecInputs derive(DesignSpec spec, String cloudId, MetroPortfolio chosen)
      Parameters:
      spec - the design spec
      cloudId - the cloud to price, or null for the first cloud with a provider
      chosen - the portfolio a run chose, or null
      Returns:
      the derived inputs
      Throws:
      IllegalArgumentException - when the spec has no cloud with a provider, or the named cloud is unknown or names no provider
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • fingerprint

      public String fingerprint()
      Returns the value of the fingerprint record component.
      Returns:
      the value of the fingerprint record component
    • cloud

      public CloudIntent cloud()
      Returns the value of the cloud record component.
      Returns:
      the value of the cloud record component
    • provider

      public CloudProviderType provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • region

      public String region()
      Returns the value of the region record component.
      Returns:
      the value of the region record component
    • egressGb

      public double egressGb()
      Returns the value of the egressGb record component.
      Returns:
      the value of the egressGb record component
    • bandwidthMbps

      public int bandwidthMbps()
      Returns the value of the bandwidthMbps record component.
      Returns:
      the value of the bandwidthMbps record component
    • metro

      public MetroCode metro()
      Returns the value of the metro record component.
      Returns:
      the value of the metro record component
    • term

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

      public List<String> assumptions()
      Returns the value of the assumptions record component.
      Returns:
      the value of the assumptions record component