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

    Constructors
    Constructor
    Description
    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)
    Creates an instance of a CreateTraceEvalRuleRequest 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.
    Returns the value of the enabled record component.
    boolean
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    @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="matchKey is required when matchType is ATTRIBUTE") boolean
     
    @jakarta.validation.constraints.AssertTrue(message="minScore must be less than maxScore") boolean
     
    Returns the value of the matchKey record component.
    Returns the value of the matchType record component.
    @NotBlank String
    Returns the value of the matchValue record component.
    double
    Returns the value of the maxScore record component.
    double
    Returns the value of the minScore record component.
    @NotBlank String
    Returns the value of the name 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

    • 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 a CreateTraceEvalRuleRequest record class.
      Parameters:
      name - the value for the name record component
      enabled - the value for the enabled record component
      matchType - the value for the matchType record component
      matchKey - the value for the matchKey record component
      matchValue - the value for the matchValue record component
      connectionId - the value for the connectionId record component
      evaluatorName - the value for the evaluatorName record component
      criteria - the value for the criteria 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

    • 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

      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.
    • name

      @NotBlank public @NotBlank String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • enabled

      public Boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • matchType

      @NotNull public @NotNull TraceMatchType matchType()
      Returns the value of the matchType record component.
      Returns:
      the value of the matchType record component
    • matchKey

      public String matchKey()
      Returns the value of the matchKey record component.
      Returns:
      the value of the matchKey record component
    • matchValue

      @NotBlank public @NotBlank String matchValue()
      Returns the value of the matchValue record component.
      Returns:
      the value of the matchValue record component
    • 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
    • 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