Record Class Progress.CostUpdate

java.lang.Object
java.lang.Record
com.tnsai.reliability.Progress.CostUpdate
Record Components:
spentUSD - cumulative recorded spend
remainingUSD - spent vs. ceiling — empty when no ceiling set
All Implemented Interfaces:
Progress
Enclosing interface:
Progress

public static record Progress.CostUpdate(Instant at, BigDecimal spentUSD, Optional<BigDecimal> remainingUSD) extends Record implements Progress
Spend tick — the orchestrator emits this when a cost-tracking integration reports new spend, so dashboards can plot against the run's RunConfig.costCeilingUSD.
  • Constructor Details

    • CostUpdate

      public CostUpdate(Instant at, BigDecimal spentUSD, Optional<BigDecimal> remainingUSD)
      Creates an instance of a CostUpdate record class.
      Parameters:
      at - the value for the at record component
      spentUSD - the value for the spentUSD record component
      remainingUSD - the value for the remainingUSD record component
  • Method Details

    • 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.
    • at

      public Instant at()
      Returns the value of the at record component.
      Specified by:
      at in interface Progress
      Returns:
      the value of the at record component
    • spentUSD

      public BigDecimal spentUSD()
      Returns the value of the spentUSD record component.
      Returns:
      the value of the spentUSD record component
    • remainingUSD

      public Optional<BigDecimal> remainingUSD()
      Returns the value of the remainingUSD record component.
      Returns:
      the value of the remainingUSD record component