Record Class DecisionDelta

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.record.DecisionDelta
Record Components:
beforeGeneratedAt - when the earlier record was produced
afterGeneratedAt - when the later record was produced
specChanged - whether the specs' fingerprints differ
specChanges - one line per changed spec property (path: before -> after)
recommendationChanged - whether the recommended portfolio differs
recommendationBefore - the earlier recommended portfolio, or null when it had none
recommendationAfter - the later recommended portfolio, or null when it has none
objectiveChanges - one line per objective whose value changed
costBefore - the earlier monthly total, or null
costAfter - the later monthly total, or null
costCurrencyBefore - the earlier total's currency, or null
costCurrencyAfter - the later total's currency, or null
costChange - the later total minus the earlier one, or null when not comparable
costLineChanges - one line per cost line added, removed or repriced (matched by label)
resilienceChanges - one line per changed resilience verdict, single point of failure or availability
risksAdded - findings in the later record only
risksRemoved - findings in the earlier record only
sectionChanges - one line per section whose status changed

public record DecisionDelta(Instant beforeGeneratedAt, Instant afterGeneratedAt, boolean specChanged, List<String> specChanges, boolean recommendationChanged, String recommendationBefore, String recommendationAfter, List<String> objectiveChanges, BigDecimal costBefore, BigDecimal costAfter, String costCurrencyBefore, String costCurrencyAfter, BigDecimal costChange, List<String> costLineChanges, List<String> resilienceChanges, List<String> risksAdded, List<String> risksRemoved, List<String> sectionChanges) extends Record
What changed between two DesignDecisionRecords, for example the same design re-run a quarter later: the spec, the recommendation and its objective values, the cost, the resilience verdicts and the findings. Produced by DesignDecisionRecord.compare(DesignDecisionRecord, DesignDecisionRecord); Jackson-serializable; toMarkdown() for a reader.
  • Constructor Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
      Returns:
      true when nothing the delta tracks changed
    • toMarkdown

      public String toMarkdown()
      Returns:
      the delta as Markdown
    • 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.
    • beforeGeneratedAt

      public Instant beforeGeneratedAt()
      Returns the value of the beforeGeneratedAt record component.
      Returns:
      the value of the beforeGeneratedAt record component
    • afterGeneratedAt

      public Instant afterGeneratedAt()
      Returns the value of the afterGeneratedAt record component.
      Returns:
      the value of the afterGeneratedAt record component
    • specChanged

      public boolean specChanged()
      Returns the value of the specChanged record component.
      Returns:
      the value of the specChanged record component
    • specChanges

      public List<String> specChanges()
      Returns the value of the specChanges record component.
      Returns:
      the value of the specChanges record component
    • recommendationChanged

      public boolean recommendationChanged()
      Returns the value of the recommendationChanged record component.
      Returns:
      the value of the recommendationChanged record component
    • recommendationBefore

      public String recommendationBefore()
      Returns the value of the recommendationBefore record component.
      Returns:
      the value of the recommendationBefore record component
    • recommendationAfter

      public String recommendationAfter()
      Returns the value of the recommendationAfter record component.
      Returns:
      the value of the recommendationAfter record component
    • objectiveChanges

      public List<String> objectiveChanges()
      Returns the value of the objectiveChanges record component.
      Returns:
      the value of the objectiveChanges record component
    • costBefore

      public BigDecimal costBefore()
      Returns the value of the costBefore record component.
      Returns:
      the value of the costBefore record component
    • costAfter

      public BigDecimal costAfter()
      Returns the value of the costAfter record component.
      Returns:
      the value of the costAfter record component
    • costCurrencyBefore

      public String costCurrencyBefore()
      Returns the value of the costCurrencyBefore record component.
      Returns:
      the value of the costCurrencyBefore record component
    • costCurrencyAfter

      public String costCurrencyAfter()
      Returns the value of the costCurrencyAfter record component.
      Returns:
      the value of the costCurrencyAfter record component
    • costChange

      public BigDecimal costChange()
      Returns the value of the costChange record component.
      Returns:
      the value of the costChange record component
    • costLineChanges

      public List<String> costLineChanges()
      Returns the value of the costLineChanges record component.
      Returns:
      the value of the costLineChanges record component
    • resilienceChanges

      public List<String> resilienceChanges()
      Returns the value of the resilienceChanges record component.
      Returns:
      the value of the resilienceChanges record component
    • risksAdded

      public List<String> risksAdded()
      Returns the value of the risksAdded record component.
      Returns:
      the value of the risksAdded record component
    • risksRemoved

      public List<String> risksRemoved()
      Returns the value of the risksRemoved record component.
      Returns:
      the value of the risksRemoved record component
    • sectionChanges

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