Record Class CaptureGenerationRequest
java.lang.Object
java.lang.Record
com.shaft.capture.generate.CaptureGenerationRequest
- Record Components:
sessionPath- persisted Capture sessionoutputDirectory- generated project rootpackageName- generated Java packageclassName- optional generated class nameoverwrite- whether existing generated artifacts may be replacedcompile- whether to compile the generated sourcereplay- whether to execute the compiled TestNG testreplayTimeout- maximum replay durationenrichmentMode- optional AI enrichment phaseenrichmentPreviewPath- preview path to write or applyenrichmentApproved- whether a reviewed preview may be appliedaiApprovalPolicy- 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAI enrichment lifecycle. -
Constructor Summary
ConstructorsConstructorDescriptionCaptureGenerationRequest(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 Summary
Modifier and TypeMethodDescriptioncom.shaft.pilot.ai.ApprovalPolicyReturns the value of theaiApprovalPolicyrecord component.Returns the value of theclassNamerecord component.booleancompile()Returns the value of thecompilerecord component.static CaptureGenerationRequestCreates deterministic defaults for one session.booleanReturns the value of theenrichmentApprovedrecord component.Returns the value of theenrichmentModerecord component.Returns the value of theenrichmentPreviewPathrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoutputDirectoryrecord component.booleanReturns the value of theoverwriterecord component.Returns the value of thepackageNamerecord component.booleanreplay()Returns the value of thereplayrecord component.Returns the value of thereplayTimeoutrecord component.Returns the value of thesessionPathrecord component.final StringtoString()Returns a string representation of this record class.
-
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
Creates deterministic defaults for one session.- Parameters:
sessionPath- persisted session- Returns:
- default request
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
sessionPath
Returns the value of thesessionPathrecord component.- Returns:
- the value of the
sessionPathrecord component
-
outputDirectory
Returns the value of theoutputDirectoryrecord component.- Returns:
- the value of the
outputDirectoryrecord component
-
packageName
Returns the value of thepackageNamerecord component.- Returns:
- the value of the
packageNamerecord component
-
className
-
overwrite
-
compile
-
replay
-
replayTimeout
Returns the value of thereplayTimeoutrecord component.- Returns:
- the value of the
replayTimeoutrecord component
-
enrichmentMode
Returns the value of theenrichmentModerecord component.- Returns:
- the value of the
enrichmentModerecord component
-
enrichmentPreviewPath
Returns the value of theenrichmentPreviewPathrecord component.- Returns:
- the value of the
enrichmentPreviewPathrecord component
-
enrichmentApproved
public boolean enrichmentApproved()Returns the value of theenrichmentApprovedrecord component.- Returns:
- the value of the
enrichmentApprovedrecord component
-
aiApprovalPolicy
public com.shaft.pilot.ai.ApprovalPolicy aiApprovalPolicy()Returns the value of theaiApprovalPolicyrecord component.- Returns:
- the value of the
aiApprovalPolicyrecord component
-