Record Class CaptureGenerationRequest

java.lang.Object
java.lang.Record
com.shaft.capture.generate.CaptureGenerationRequest
Record Components:
sessionPath - persisted Capture session
outputDirectory - generated project root
packageName - generated Java package
className - optional generated class name
overwrite - whether existing generated artifacts may be replaced
compile - whether to compile the generated source
replay - whether to execute the compiled TestNG test
replayTimeout - maximum replay duration
enrichmentMode - optional AI enrichment phase
enrichmentPreviewPath - preview path to write or apply
enrichmentApproved - whether a reviewed preview may be applied
aiApprovalPolicy - explicit evidence and processing-location approval for preview generation

public record CaptureGenerationRequest(Path sessionPath, Path outputDirectory, String packageName, String className, boolean overwrite, boolean compile, boolean replay, Duration replayTimeout, CaptureGenerationRequest.EnrichmentMode enrichmentMode, Path enrichmentPreviewPath, boolean enrichmentApproved, com.shaft.pilot.ai.ApprovalPolicy aiApprovalPolicy) extends Record
Immutable options for converting a persisted Capture session into a SHAFT TestNG test.
  • Constructor Details

    • CaptureGenerationRequest

      public CaptureGenerationRequest(Path sessionPath, Path outputDirectory, String packageName, String className, boolean overwrite, boolean compile, boolean replay, Duration replayTimeout, CaptureGenerationRequest.EnrichmentMode enrichmentMode, Path enrichmentPreviewPath, boolean enrichmentApproved, com.shaft.pilot.ai.ApprovalPolicy aiApprovalPolicy)
      Creates normalized generation options.
  • Method Details

    • defaults

      public static CaptureGenerationRequest defaults(Path sessionPath)
      Creates deterministic defaults for one session.
      Parameters:
      sessionPath - persisted session
      Returns:
      default request
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • sessionPath

      public Path sessionPath()
      Returns the value of the sessionPath record component.
      Returns:
      the value of the sessionPath record component
    • outputDirectory

      public Path outputDirectory()
      Returns the value of the outputDirectory record component.
      Returns:
      the value of the outputDirectory record component
    • packageName

      public String packageName()
      Returns the value of the packageName record component.
      Returns:
      the value of the packageName record component
    • className

      public String className()
      Returns the value of the className record component.
      Returns:
      the value of the className record component
    • overwrite

      public boolean overwrite()
      Returns the value of the overwrite record component.
      Returns:
      the value of the overwrite record component
    • compile

      public boolean compile()
      Returns the value of the compile record component.
      Returns:
      the value of the compile record component
    • replay

      public boolean replay()
      Returns the value of the replay record component.
      Returns:
      the value of the replay record component
    • replayTimeout

      public Duration replayTimeout()
      Returns the value of the replayTimeout record component.
      Returns:
      the value of the replayTimeout record component
    • enrichmentMode

      public CaptureGenerationRequest.EnrichmentMode enrichmentMode()
      Returns the value of the enrichmentMode record component.
      Returns:
      the value of the enrichmentMode record component
    • enrichmentPreviewPath

      public Path enrichmentPreviewPath()
      Returns the value of the enrichmentPreviewPath record component.
      Returns:
      the value of the enrichmentPreviewPath record component
    • enrichmentApproved

      public boolean enrichmentApproved()
      Returns the value of the enrichmentApproved record component.
      Returns:
      the value of the enrichmentApproved record component
    • aiApprovalPolicy

      public com.shaft.pilot.ai.ApprovalPolicy aiApprovalPolicy()
      Returns the value of the aiApprovalPolicy record component.
      Returns:
      the value of the aiApprovalPolicy record component