Record Class ResponseLeaf
java.lang.Object
java.lang.Record
com.shaft.capture.generate.api.ResponseLeaf
- Record Components:
jsonPath- JSONPath-style pointer to this leaf (e.g.$.id,$.items[0].sku)key- the JSON property name owning this leaf (empty for array elements with no key)value- the leaf's textual valueclassification- this leaf's classification
public record ResponseLeaf(String jsonPath, String key, String value, LeafClassification classification)
extends Record
One classified scalar leaf discovered while walking a recorded JSON response body.
-
Constructor Summary
ConstructorsConstructorDescriptionResponseLeaf(String jsonPath, String key, String value, LeafClassification classification) Creates an instance of aResponseLeafrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this leaf upgraded toLeafClassification.CORRELATED.Returns the value of theclassificationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.jsonPath()Returns the value of thejsonPathrecord component.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
ResponseLeaf
Creates an instance of aResponseLeafrecord class.- Parameters:
jsonPath- the value for thejsonPathrecord componentkey- the value for thekeyrecord componentvalue- the value for thevaluerecord componentclassification- the value for theclassificationrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
jsonPath
-
key
-
value
-
classification
Returns the value of theclassificationrecord component.- Returns:
- the value of the
classificationrecord component