Record Class FileDownloadResponse
java.lang.Object
java.lang.Record
io.agentscope.harness.agent.filesystem.model.FileDownloadResponse
- Record Components:
path- the file path that was requestedcontent- file contents as bytes on success,nullon failureerror- error description on failure,nullon success
Result of a single file download operation.
-
Constructor Summary
ConstructorsConstructorDescriptionFileDownloadResponse(String path, byte[] content, String error) Creates an instance of aFileDownloadResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]content()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static FileDownloadResponsefinal inthashCode()Returns a hash code value for this object.booleanpath()Returns the value of thepathrecord component.static FileDownloadResponsefinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
success
-
fail
-
isSuccess
public boolean isSuccess() -
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. All components in this record class are compared withObjects::equals(Object,Object). -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
content
public byte[] content()Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-