Class ConversationItemDone
-
- All Implemented Interfaces:
public final class ConversationItemDone
Returned when a conversation item is finalized.
The event will include the full content of the Item except for audio data, which can be retrieved separately with a
conversation.item.retrieve
event if needed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ConversationItemDone.Builder
A builder for ConversationItemDone.
-
Method Summary
Modifier and Type Method Description final String
eventId()
The unique ID of the server event. final ConversationItem
item()
A single item within a Realtime conversation. final JsonValue
_type()
The event type, must be conversation.item.done
.final Optional<String>
previousItemId()
The ID of the item that precedes this one, if any. final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final JsonField<ConversationItem>
_item()
Returns the raw JSON value of item. final JsonField<String>
_previousItemId()
Returns the raw JSON value of previousItemId. final Map<String, JsonValue>
_additionalProperties()
final ConversationItemDone.Builder
toBuilder()
final ConversationItemDone
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ConversationItemDone.Builder
builder()
Returns a mutable builder for constructing an instance of ConversationItemDone. -
-
Method Detail
-
item
final ConversationItem item()
A single item within a Realtime conversation.
-
_type
final JsonValue _type()
The event type, must be
conversation.item.done
.Expected to always return the following:
JsonValue.from("conversation.item.done")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
previousItemId
final Optional<String> previousItemId()
The ID of the item that precedes this one, if any. This is used to maintain ordering when items are inserted.
-
_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.
-
_item
final JsonField<ConversationItem> _item()
Returns the raw JSON value of item.
Unlike item, this method doesn't throw if the JSON field has an unexpected type.
-
_previousItemId
final JsonField<String> _previousItemId()
Returns the raw JSON value of previousItemId.
Unlike previousItemId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ConversationItemDone.Builder toBuilder()
-
validate
final ConversationItemDone validate()
-
builder
final static ConversationItemDone.Builder builder()
Returns a mutable builder for constructing an instance of ConversationItemDone.
The following fields are required:
.eventId() .item()
-
-
-
-