Record Class ThreadRun
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.ThreadRun
public record ThreadRun(String id, long createdAt, String threadId, String assistantId, String status, ThreadRun.RequiredAction requiredAction, ThreadRun.LastError lastError, long expiresAt, Long startedAt, Long cancelledAt, Long failedAt, Long completedAt, String model, String instructions, List<Tool> tools, List<String> fileIds, Map<String,String> metadata)
extends Record
Represents an execution run on a thread.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
The last error associated with this run.static final record
Details on the action required to continue the run. -
Constructor Summary
ConstructorsConstructorDescriptionThreadRun
(String id, long createdAt, String threadId, String assistantId, String status, ThreadRun.RequiredAction requiredAction, ThreadRun.LastError lastError, long expiresAt, Long startedAt, Long cancelledAt, Long failedAt, Long completedAt, String model, String instructions, List<Tool> tools, List<String> fileIds, Map<String, String> metadata) Creates an instance of aThreadRun
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassistantId
record component.Returns the value of thecancelledAt
record component.Returns the value of thecompletedAt
record component.long
Returns the value of thecreatedAt
record component.final boolean
Indicates whether some other object is "equal to" this one.long
Returns the value of theexpiresAt
record component.failedAt()
Returns the value of thefailedAt
record component.fileIds()
Returns the value of thefileIds
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of theinstructions
record component.Returns the value of thelastError
record component.metadata()
Returns the value of themetadata
record component.model()
Returns the value of themodel
record component.Returns the value of therequiredAction
record component.Returns the value of thestartedAt
record component.status()
Returns the value of thestatus
record component.threadId()
Returns the value of thethreadId
record component.tools()
Returns the value of thetools
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ThreadRun
public ThreadRun(String id, long createdAt, String threadId, String assistantId, String status, ThreadRun.RequiredAction requiredAction, ThreadRun.LastError lastError, long expiresAt, Long startedAt, Long cancelledAt, Long failedAt, Long completedAt, String model, String instructions, List<Tool> tools, List<String> fileIds, Map<String, String> metadata) Creates an instance of aThreadRun
record class.- Parameters:
id
- the value for theid
record componentcreatedAt
- the value for thecreatedAt
record componentthreadId
- the value for thethreadId
record componentassistantId
- the value for theassistantId
record componentstatus
- the value for thestatus
record componentrequiredAction
- the value for therequiredAction
record componentlastError
- the value for thelastError
record componentexpiresAt
- the value for theexpiresAt
record componentstartedAt
- the value for thestartedAt
record componentcancelledAt
- the value for thecancelledAt
record componentfailedAt
- the value for thefailedAt
record componentcompletedAt
- the value for thecompletedAt
record componentmodel
- the value for themodel
record componentinstructions
- the value for theinstructions
record componenttools
- the value for thetools
record componentfileIds
- the value for thefileIds
record componentmetadata
- the value for themetadata
record component
-
-
Method Details
-
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 '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
createdAt
public long createdAt()Returns the value of thecreatedAt
record component.- Returns:
- the value of the
createdAt
record component
-
threadId
Returns the value of thethreadId
record component.- Returns:
- the value of the
threadId
record component
-
assistantId
Returns the value of theassistantId
record component.- Returns:
- the value of the
assistantId
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
requiredAction
Returns the value of therequiredAction
record component.- Returns:
- the value of the
requiredAction
record component
-
lastError
Returns the value of thelastError
record component.- Returns:
- the value of the
lastError
record component
-
expiresAt
public long expiresAt()Returns the value of theexpiresAt
record component.- Returns:
- the value of the
expiresAt
record component
-
startedAt
Returns the value of thestartedAt
record component.- Returns:
- the value of the
startedAt
record component
-
cancelledAt
Returns the value of thecancelledAt
record component.- Returns:
- the value of the
cancelledAt
record component
-
failedAt
Returns the value of thefailedAt
record component.- Returns:
- the value of the
failedAt
record component
-
completedAt
Returns the value of thecompletedAt
record component.- Returns:
- the value of the
completedAt
record component
-
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
instructions
Returns the value of theinstructions
record component.- Returns:
- the value of the
instructions
record component
-
tools
Returns the value of thetools
record component.- Returns:
- the value of the
tools
record component
-
fileIds
Returns the value of thefileIds
record component.- Returns:
- the value of the
fileIds
record component
-
metadata
Returns the value of themetadata
record component.- Returns:
- the value of the
metadata
record component
-