Class ResponseCancelEvent
-
- All Implemented Interfaces:
public final class ResponseCancelEvent
Send this event to cancel an in-progress response. The server will respond with a
response.done
event with a status ofresponse.status=cancelled
. If there is no response to cancel, the server will respond with an error.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ResponseCancelEvent.Builder
A builder for ResponseCancelEvent.
-
Method Summary
Modifier and Type Method Description final JsonValue
_type()
The event type, must be response.cancel
.final Optional<String>
eventId()
Optional client-generated ID used to identify this event. final Optional<String>
responseId()
A specific response ID to cancel - if not provided, will cancel an in-progress response in the default conversation. final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final JsonField<String>
_responseId()
Returns the raw JSON value of responseId. final Map<String, JsonValue>
_additionalProperties()
final ResponseCancelEvent.Builder
toBuilder()
final ResponseCancelEvent
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseCancelEvent.Builder
builder()
Returns a mutable builder for constructing an instance of ResponseCancelEvent. -
-
Method Detail
-
_type
final JsonValue _type()
The event type, must be
response.cancel
.Expected to always return the following:
JsonValue.from("response.cancel")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
responseId
final Optional<String> responseId()
A specific response ID to cancel - if not provided, will cancel an in-progress response in the default conversation.
-
_eventId
final JsonField<String> _eventId()
Returns the raw JSON value of eventId.
Unlike eventId, this method doesn't throw if the JSON field has an unexpected type.
-
_responseId
final JsonField<String> _responseId()
Returns the raw JSON value of responseId.
Unlike responseId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseCancelEvent.Builder toBuilder()
-
validate
final ResponseCancelEvent validate()
-
builder
final static ResponseCancelEvent.Builder builder()
Returns a mutable builder for constructing an instance of ResponseCancelEvent.
-
-
-
-