Package dev.dokimos.server.dto.v1
Record Class CreateTraceEvalRuleRequest
java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.CreateTraceEvalRuleRequest
public record CreateTraceEvalRuleRequest(@NotBlank String name, Boolean enabled, @NotNull TraceMatchType matchType, String matchKey, @NotBlank String matchValue, @NotNull UUID connectionId, @NotBlank String evaluatorName, @NotBlank String criteria, double minScore, double maxScore, Double threshold)
extends Record
Request to create or replace a trace eval rule.
matchKey is required only when
matchType is TraceMatchType.ATTRIBUTE; for TraceMatchType.SPAN_NAME it is
ignored. minScore must be less than maxScore.-
Constructor Summary
ConstructorsConstructorDescriptionCreateTraceEvalRuleRequest(@NotBlank String name, Boolean enabled, @NotNull TraceMatchType matchType, String matchKey, @NotBlank String matchValue, @NotNull UUID connectionId, @NotBlank String evaluatorName, @NotBlank String criteria, double minScore, double maxScore, Double threshold) Creates an instance of aCreateTraceEvalRuleRequestrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull UUIDReturns the value of theconnectionIdrecord component.@NotBlank Stringcriteria()Returns the value of thecriteriarecord component.enabled()Returns the value of theenabledrecord component.booleanfinal booleanIndicates whether some other object is "equal to" this one.@NotBlank StringReturns the value of theevaluatorNamerecord component.final inthashCode()Returns a hash code value for this object.@jakarta.validation.constraints.AssertTrue(message="matchKey is required when matchType is ATTRIBUTE") boolean@jakarta.validation.constraints.AssertTrue(message="minScore must be less than maxScore") booleanmatchKey()Returns the value of thematchKeyrecord component.@NotNull TraceMatchTypeReturns the value of thematchTyperecord component.@NotBlank StringReturns the value of thematchValuerecord component.doublemaxScore()Returns the value of themaxScorerecord component.doubleminScore()Returns the value of theminScorerecord component.@NotBlank Stringname()Returns the value of thenamerecord component.Returns the value of thethresholdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CreateTraceEvalRuleRequest
public CreateTraceEvalRuleRequest(@NotBlank @NotBlank String name, Boolean enabled, @NotNull @NotNull TraceMatchType matchType, String matchKey, @NotBlank @NotBlank String matchValue, @NotNull @NotNull UUID connectionId, @NotBlank @NotBlank String evaluatorName, @NotBlank @NotBlank String criteria, double minScore, double maxScore, Double threshold) Creates an instance of aCreateTraceEvalRuleRequestrecord class.- Parameters:
name- the value for thenamerecord componentenabled- the value for theenabledrecord componentmatchType- the value for thematchTyperecord componentmatchKey- the value for thematchKeyrecord componentmatchValue- the value for thematchValuerecord componentconnectionId- the value for theconnectionIdrecord componentevaluatorName- the value for theevaluatorNamerecord componentcriteria- the value for thecriteriarecord componentminScore- the value for theminScorerecord componentmaxScore- the value for themaxScorerecord componentthreshold- the value for thethresholdrecord component
-
-
Method Details
-
enabledOrDefault
public boolean enabledOrDefault() -
isMatchKeyValid
@AssertTrue(message="matchKey is required when matchType is ATTRIBUTE") public @jakarta.validation.constraints.AssertTrue(message="matchKey is required when matchType is ATTRIBUTE") boolean isMatchKeyValid() -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
enabled
Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
matchType
Returns the value of thematchTyperecord component.- Returns:
- the value of the
matchTyperecord component
-
matchKey
Returns the value of thematchKeyrecord component.- Returns:
- the value of the
matchKeyrecord component
-
matchValue
Returns the value of thematchValuerecord component.- Returns:
- the value of the
matchValuerecord component
-
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
-
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
-