Record Class TriggerStatus

java.lang.Object
java.lang.Record
org.chenile.trigger.model.TriggerStatus

public record TriggerStatus(String triggerId, String eventName, String status, int attempt, Instant triggerTime, Instant createdAt, Instant startedAt, Instant finishedAt, String error, String source, Map<String,Object> triggerContext, Object payload) extends Record
Status and input metadata, never the event invocation output.
  • Field Details

    • triggerId

      private final String triggerId
      The field for the triggerId record component.
    • eventName

      private final String eventName
      The field for the eventName record component.
    • status

      private final String status
      The field for the status record component.
    • attempt

      private final int attempt
      The field for the attempt record component.
    • triggerTime

      private final Instant triggerTime
      The field for the triggerTime record component.
    • createdAt

      private final Instant createdAt
      The field for the createdAt record component.
    • startedAt

      private final Instant startedAt
      The field for the startedAt record component.
    • finishedAt

      private final Instant finishedAt
      The field for the finishedAt record component.
    • error

      private final String error
      The field for the error record component.
    • source

      private final String source
      The field for the source record component.
    • triggerContext

      private final Map<String,Object> triggerContext
      The field for the triggerContext record component.
    • payload

      private final Object payload
      The field for the payload record component.
  • Constructor Details

    • TriggerStatus

      public TriggerStatus(String triggerId, String eventName, String status, int attempt, Instant triggerTime, Instant createdAt, Instant startedAt, Instant finishedAt, String error, String source, Map<String,Object> triggerContext, Object payload)
      Creates an instance of a TriggerStatus record class.
      Parameters:
      triggerId - the value for the triggerId record component
      eventName - the value for the eventName record component
      status - the value for the status record component
      attempt - the value for the attempt record component
      triggerTime - the value for the triggerTime record component
      createdAt - the value for the createdAt record component
      startedAt - the value for the startedAt record component
      finishedAt - the value for the finishedAt record component
      error - the value for the error record component
      source - the value for the source record component
      triggerContext - the value for the triggerContext record component
      payload - the value for the payload 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. 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.
    • triggerId

      public String triggerId()
      Returns the value of the triggerId record component.
      Returns:
      the value of the triggerId record component
    • eventName

      public String eventName()
      Returns the value of the eventName record component.
      Returns:
      the value of the eventName record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • attempt

      public int attempt()
      Returns the value of the attempt record component.
      Returns:
      the value of the attempt record component
    • triggerTime

      public Instant triggerTime()
      Returns the value of the triggerTime record component.
      Returns:
      the value of the triggerTime record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • startedAt

      public Instant startedAt()
      Returns the value of the startedAt record component.
      Returns:
      the value of the startedAt record component
    • finishedAt

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

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

      public String source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • triggerContext

      public Map<String,Object> triggerContext()
      Returns the value of the triggerContext record component.
      Returns:
      the value of the triggerContext record component
    • payload

      public Object payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component