Class SessionUpdateEvent.Builder
-
- All Implemented Interfaces:
public final class SessionUpdateEvent.Builder
A builder for SessionUpdateEvent.
-
-
Method Summary
Modifier and Type Method Description final SessionUpdateEvent.Builder
session(SessionUpdateEvent.Session session)
Update the Realtime session. final SessionUpdateEvent.Builder
session(JsonField<SessionUpdateEvent.Session> session)
Sets Builder.session to an arbitrary JSON value. final SessionUpdateEvent.Builder
session(RealtimeSessionCreateRequest realtimeSessionCreateRequest)
Alias for calling session with Session.ofRealtimeSessionCreateRequest(realtimeSessionCreateRequest)
.final SessionUpdateEvent.Builder
session(RealtimeTranscriptionSessionCreateRequest realtimeTranscriptionSessionCreateRequest)
Alias for calling session with Session.ofRealtimeTranscriptionSessionCreateRequest(realtimeTranscriptionSessionCreateRequest)
.final SessionUpdateEvent.Builder
type(JsonValue type)
Sets the field to an arbitrary JSON value. final SessionUpdateEvent.Builder
eventId(String eventId)
Optional client-generated ID used to identify this event. final SessionUpdateEvent.Builder
eventId(JsonField<String> eventId)
Sets Builder.eventId to an arbitrary JSON value. final SessionUpdateEvent.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final SessionUpdateEvent.Builder
putAdditionalProperty(String key, JsonValue value)
final SessionUpdateEvent.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final SessionUpdateEvent.Builder
removeAdditionalProperty(String key)
final SessionUpdateEvent.Builder
removeAllAdditionalProperties(Set<String> keys)
final SessionUpdateEvent
build()
Returns an immutable instance of SessionUpdateEvent. -
-
Method Detail
-
session
final SessionUpdateEvent.Builder session(SessionUpdateEvent.Session session)
Update the Realtime session. Choose either a realtime session or a transcription session.
-
session
final SessionUpdateEvent.Builder session(JsonField<SessionUpdateEvent.Session> session)
Sets Builder.session to an arbitrary JSON value.
You should usually call Builder.session with a well-typed Session value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
session
final SessionUpdateEvent.Builder session(RealtimeSessionCreateRequest realtimeSessionCreateRequest)
Alias for calling session with
Session.ofRealtimeSessionCreateRequest(realtimeSessionCreateRequest)
.
-
session
final SessionUpdateEvent.Builder session(RealtimeTranscriptionSessionCreateRequest realtimeTranscriptionSessionCreateRequest)
Alias for calling session with
Session.ofRealtimeTranscriptionSessionCreateRequest(realtimeTranscriptionSessionCreateRequest)
.
-
type
final SessionUpdateEvent.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("session.update")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
eventId
final SessionUpdateEvent.Builder eventId(String eventId)
Optional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding
session.updated
event will not include it.
-
eventId
final SessionUpdateEvent.Builder eventId(JsonField<String> eventId)
Sets Builder.eventId to an arbitrary JSON value.
You should usually call Builder.eventId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final SessionUpdateEvent.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final SessionUpdateEvent.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final SessionUpdateEvent.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final SessionUpdateEvent.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final SessionUpdateEvent.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final SessionUpdateEvent build()
Returns an immutable instance of SessionUpdateEvent.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.session()
-
-
-
-