Record Class Hitl.Decision

java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.connect.hitl.Hitl.Decision
Record Components:
invocationId - the ask it answers
verdict - one of Hitl.VERDICTS, or refused when the desk could not take the ask
by - the deciders, as the channel proved them
proof - how each was proved
validUntil - until when a source accepts it as proof
Enclosing class:
Hitl

public static record Hitl.Decision(String invocationId, String verdict, List<String> by, String proof, String channel, String reason, String argsHash, String amendedArguments, Instant decidedAt, Instant validUntil, String error) extends Record
A decision as the desk wrote it.
  • Constructor Details

    • Decision

      public Decision(String invocationId, String verdict, List<String> by, String proof, String channel, String reason, String argsHash, String amendedArguments, Instant decidedAt, Instant validUntil, String error)
      Creates an instance of a Decision record class.
      Parameters:
      invocationId - the value for the invocationId record component
      verdict - the value for the verdict record component
      by - the value for the by record component
      proof - the value for the proof record component
      channel - the value for the channel record component
      reason - the value for the reason record component
      argsHash - the value for the argsHash record component
      amendedArguments - the value for the amendedArguments record component
      decidedAt - the value for the decidedAt record component
      validUntil - the value for the validUntil record component
      error - the value for the error record component
  • Method Details

    • of

      The decision a desk's result carries; a result with ok=false is a refused ask.
    • approves

      public boolean approves()
      Whether a person approved: approved, or amended (the call then runs with the amended arguments).
    • admits

      public boolean admits(String callHash, Instant now)
      Whether this decision lets a call with this arguments' hash run now.
    • 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.
    • invocationId

      public String invocationId()
      Returns the value of the invocationId record component.
      Returns:
      the value of the invocationId record component
    • verdict

      public String verdict()
      Returns the value of the verdict record component.
      Returns:
      the value of the verdict record component
    • by

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

      public String proof()
      Returns the value of the proof record component.
      Returns:
      the value of the proof record component
    • channel

      public String channel()
      Returns the value of the channel record component.
      Returns:
      the value of the channel record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • argsHash

      public String argsHash()
      Returns the value of the argsHash record component.
      Returns:
      the value of the argsHash record component
    • amendedArguments

      public String amendedArguments()
      Returns the value of the amendedArguments record component.
      Returns:
      the value of the amendedArguments record component
    • decidedAt

      public Instant decidedAt()
      Returns the value of the decidedAt record component.
      Returns:
      the value of the decidedAt record component
    • validUntil

      public Instant validUntil()
      Returns the value of the validUntil record component.
      Returns:
      the value of the validUntil record component
    • error

      public String error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component