Record Class ArtifactDeliveryResult
java.lang.Object
java.lang.Record
io.agentscope.harness.agent.artifact.ArtifactDeliveryResult
- Record Components:
successful- whether the artifact was deliveredconflict- whether the delivery was rejected because an artifact with the same name already exists andforcewasfalseerror- error description on failure,nullon successmessage- human-readable confirmation detail on success (may benull)
-
Constructor Summary
ConstructorsConstructorDescriptionArtifactDeliveryResult(boolean successful, boolean conflict, String error, String message) Creates an instance of aArtifactDeliveryResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanconflict()Returns the value of theconflictrecord component.static ArtifactDeliveryResultfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static ArtifactDeliveryResultfinal inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.static ArtifactDeliveryResultsuccess()static ArtifactDeliveryResultbooleanReturns the value of thesuccessfulrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArtifactDeliveryResult
Creates an instance of aArtifactDeliveryResultrecord class.- Parameters:
successful- the value for thesuccessfulrecord componentconflict- the value for theconflictrecord componenterror- the value for theerrorrecord componentmessage- the value for themessagerecord component
-
-
Method Details
-
success
-
success
-
fail
-
conflict
-
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. -
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. -
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 '=='. -
successful
public boolean successful()Returns the value of thesuccessfulrecord component.- Returns:
- the value of the
successfulrecord component
-
conflict
public boolean conflict()Returns the value of theconflictrecord component.- Returns:
- the value of the
conflictrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-