Record Class EnqueueJudgeRequest

java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.EnqueueJudgeRequest

public record EnqueueJudgeRequest(@NotNull UUID connectionId, @NotBlank String evaluatorName, @NotBlank String criteria, List<String> evaluationParams, double minScore, double maxScore, Double threshold) extends Record
Request to enqueue a server-side judge job for a run. evaluationParams names which test-case fields are included in the judge prompt; each entry must match a EvalTestCaseParam name.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EnqueueJudgeRequest(@NotNull UUID connectionId, @NotBlank String evaluatorName, @NotBlank String criteria, List<String> evaluationParams, double minScore, double maxScore, Double threshold)
    Creates an instance of a EnqueueJudgeRequest record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull UUID
    Returns the value of the connectionId record component.
    @NotBlank String
    Returns the value of the criteria record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the evaluationParams record component.
    @NotBlank String
    Returns the value of the evaluatorName record component.
    final int
    Returns a hash code value for this object.
    @jakarta.validation.constraints.AssertTrue(message="evaluationParams must be non-empty and contain valid parameter names") boolean
     
    @jakarta.validation.constraints.AssertTrue(message="minScore must be less than maxScore") boolean
     
    double
    Returns the value of the maxScore record component.
    double
    Returns the value of the minScore record component.
    Returns the value of the threshold record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • EnqueueJudgeRequest

      public EnqueueJudgeRequest(@NotNull @NotNull UUID connectionId, @NotBlank @NotBlank String evaluatorName, @NotBlank @NotBlank String criteria, List<String> evaluationParams, double minScore, double maxScore, Double threshold)
      Creates an instance of a EnqueueJudgeRequest record class.
      Parameters:
      connectionId - the value for the connectionId record component
      evaluatorName - the value for the evaluatorName record component
      criteria - the value for the criteria record component
      evaluationParams - the value for the evaluationParams record component
      minScore - the value for the minScore record component
      maxScore - the value for the maxScore record component
      threshold - the value for the threshold record component
  • Method Details

    • isEvaluationParamsValid

      @AssertTrue(message="evaluationParams must be non-empty and contain valid parameter names") public @jakarta.validation.constraints.AssertTrue(message="evaluationParams must be non-empty and contain valid parameter names") boolean isEvaluationParamsValid()
    • isScoreRangeValid

      @AssertTrue(message="minScore must be less than maxScore") public @jakarta.validation.constraints.AssertTrue(message="minScore must be less than maxScore") boolean isScoreRangeValid()
    • 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 '=='.
      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.
    • connectionId

      @NotNull public @NotNull UUID connectionId()
      Returns the value of the connectionId record component.
      Returns:
      the value of the connectionId record component
    • evaluatorName

      @NotBlank public @NotBlank String evaluatorName()
      Returns the value of the evaluatorName record component.
      Returns:
      the value of the evaluatorName record component
    • criteria

      @NotBlank public @NotBlank String criteria()
      Returns the value of the criteria record component.
      Returns:
      the value of the criteria record component
    • evaluationParams

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

      public double minScore()
      Returns the value of the minScore record component.
      Returns:
      the value of the minScore record component
    • maxScore

      public double maxScore()
      Returns the value of the maxScore record component.
      Returns:
      the value of the maxScore record component
    • threshold

      public Double threshold()
      Returns the value of the threshold record component.
      Returns:
      the value of the threshold record component