Interface RunStreamEvent.Visitor
-
- All Implemented Interfaces:
public interface RunStreamEvent.Visitor<T extends Object>An interface that defines how to map each variant of RunStreamEvent to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitThreadRunCreated(RunStreamEvent.ThreadRunCreated threadRunCreated)Occurs when a new run is created. abstract TvisitThreadRunQueued(RunStreamEvent.ThreadRunQueued threadRunQueued)Occurs when a run moves to a queuedstatus.abstract TvisitThreadRunInProgress(RunStreamEvent.ThreadRunInProgress threadRunInProgress)Occurs when a run moves to an in_progressstatus.abstract TvisitThreadRunRequiresAction(RunStreamEvent.ThreadRunRequiresAction threadRunRequiresAction)Occurs when a run moves to a requires_actionstatus.abstract TvisitThreadRunCompleted(RunStreamEvent.ThreadRunCompleted threadRunCompleted)Occurs when a run is completed. abstract TvisitThreadRunIncomplete(RunStreamEvent.ThreadRunIncomplete threadRunIncomplete)Occurs when a run ends with status incomplete.abstract TvisitThreadRunFailed(RunStreamEvent.ThreadRunFailed threadRunFailed)Occurs when a run fails. abstract TvisitThreadRunCancelling(RunStreamEvent.ThreadRunCancelling threadRunCancelling)Occurs when a run moves to a cancellingstatus.abstract TvisitThreadRunCancelled(RunStreamEvent.ThreadRunCancelled threadRunCancelled)Occurs when a run is cancelled. abstract TvisitThreadRunExpired(RunStreamEvent.ThreadRunExpired threadRunExpired)Occurs when a run expires. Tunknown(JsonValue json)Maps an unknown variant of RunStreamEvent to a value of type T. -
-
Method Detail
-
visitThreadRunCreated
abstract T visitThreadRunCreated(RunStreamEvent.ThreadRunCreated threadRunCreated)
Occurs when a new run is created.
-
visitThreadRunQueued
abstract T visitThreadRunQueued(RunStreamEvent.ThreadRunQueued threadRunQueued)
Occurs when a run moves to a
queuedstatus.
-
visitThreadRunInProgress
abstract T visitThreadRunInProgress(RunStreamEvent.ThreadRunInProgress threadRunInProgress)
Occurs when a run moves to an
in_progressstatus.
-
visitThreadRunRequiresAction
abstract T visitThreadRunRequiresAction(RunStreamEvent.ThreadRunRequiresAction threadRunRequiresAction)
Occurs when a run moves to a
requires_actionstatus.
-
visitThreadRunCompleted
abstract T visitThreadRunCompleted(RunStreamEvent.ThreadRunCompleted threadRunCompleted)
Occurs when a run is completed.
-
visitThreadRunIncomplete
abstract T visitThreadRunIncomplete(RunStreamEvent.ThreadRunIncomplete threadRunIncomplete)
Occurs when a run ends with status
incomplete.
-
visitThreadRunFailed
abstract T visitThreadRunFailed(RunStreamEvent.ThreadRunFailed threadRunFailed)
Occurs when a run fails.
-
visitThreadRunCancelling
abstract T visitThreadRunCancelling(RunStreamEvent.ThreadRunCancelling threadRunCancelling)
Occurs when a run moves to a
cancellingstatus.
-
visitThreadRunCancelled
abstract T visitThreadRunCancelled(RunStreamEvent.ThreadRunCancelled threadRunCancelled)
Occurs when a run is cancelled.
-
visitThreadRunExpired
abstract T visitThreadRunExpired(RunStreamEvent.ThreadRunExpired threadRunExpired)
Occurs when a run expires.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of RunStreamEvent to a value of type T.
An instance of RunStreamEvent can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-