Package dev.dokimos.server.dto.v1
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 -
Method Summary
Modifier and TypeMethodDescription@NotNull UUIDReturns the value of theconnectionIdrecord component.@NotBlank Stringcriteria()Returns the value of thecriteriarecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevaluationParamsrecord component.@NotBlank StringReturns the value of theevaluatorNamerecord component.final inthashCode()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") booleandoublemaxScore()Returns the value of themaxScorerecord component.doubleminScore()Returns the value of theminScorerecord component.Returns the value of thethresholdrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aEnqueueJudgeRequestrecord class.- Parameters:
connectionId- the value for theconnectionIdrecord componentevaluatorName- the value for theevaluatorNamerecord componentcriteria- the value for thecriteriarecord componentevaluationParams- the value for theevaluationParamsrecord componentminScore- the value for theminScorerecord componentmaxScore- the value for themaxScorerecord componentthreshold- the value for thethresholdrecord 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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
connectionId
Returns the value of theconnectionIdrecord component.- Returns:
- the value of the
connectionIdrecord component
-
evaluatorName
Returns the value of theevaluatorNamerecord component.- Returns:
- the value of the
evaluatorNamerecord component
-
criteria
Returns the value of thecriteriarecord component.- Returns:
- the value of the
criteriarecord component
-
evaluationParams
Returns the value of theevaluationParamsrecord component.- Returns:
- the value of the
evaluationParamsrecord component
-
minScore
public double minScore()Returns the value of theminScorerecord component.- Returns:
- the value of the
minScorerecord component
-
maxScore
public double maxScore()Returns the value of themaxScorerecord component.- Returns:
- the value of the
maxScorerecord component
-
threshold
Returns the value of thethresholdrecord component.- Returns:
- the value of the
thresholdrecord component
-