Record Class SkillPromoter.PromotionResult

java.lang.Object
java.lang.Record
io.agentscope.harness.agent.skill.curator.SkillPromoter.PromotionResult
Enclosing class:
SkillPromoter

public static record SkillPromoter.PromotionResult(SkillPromoter.PromotionResult.Status status, String message, List<String> environments, String reviewerId, SkillSecurityScanner.ScanResult scan) extends Record
  • Constructor Details

    • PromotionResult

      public PromotionResult(SkillPromoter.PromotionResult.Status status, String message, List<String> environments, String reviewerId, SkillSecurityScanner.ScanResult scan)
      Creates an instance of a PromotionResult record class.
      Parameters:
      status - the value for the status record component
      message - the value for the message record component
      environments - the value for the environments record component
      reviewerId - the value for the reviewerId record component
      scan - the value for the scan record component
  • Method Details

    • approved

      public static SkillPromoter.PromotionResult approved(String reviewerId, List<String> environments, SkillSecurityScanner.ScanResult scan)
    • deferred

      public static SkillPromoter.PromotionResult deferred(String reason, Duration retryAfter)
    • rejected

    • invalid

      public static SkillPromoter.PromotionResult invalid(String reason)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • status

      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • environments

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

      public String reviewerId()
      Returns the value of the reviewerId record component.
      Returns:
      the value of the reviewerId record component
    • scan

      Returns the value of the scan record component.
      Returns:
      the value of the scan record component