ReceiveMessage class sealed

Available extensions
Annotations
  • @Freezed.new(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)

Constructors

ReceiveMessage.assistantEnd({String? customSessionId})
const
factory
ReceiveMessage.assistantMessage({required bool fromText, required Message message, required Models models, String? customSessionId, String? id})
const
factory
ReceiveMessage.assistantProsody({required Models models, String? customSessionId, String? id})
const
factory
ReceiveMessage.audioOutput({required String data, required String id, required int index, String? customSessionId})
const
factory
ReceiveMessage.chatMetadata({required String chatGroupId, required String chatId, String? requestId, String? customSessionId})
const
factory
ReceiveMessage.error({required String code, required String message, required String slug, String? customSessionId, String? requestId})
const
factory
ReceiveMessage.fromJson(Map<String, Object?> json)
factory
ReceiveMessage.toolCall({required String name, required String parameters, required bool responseRequired, required String toolCallId, String? customSessionId, String? toolType})
const
factory
ReceiveMessage.toolError({required String error, required String toolCallId, String? code, String? content, String? customSessionId, String? level, String? toolType})
const
factory
ReceiveMessage.toolResponse({required String content, required String toolCallId, String? customSessionId, String? toolName, String? toolType})
const
factory
ReceiveMessage.userInterruption({required int time, String? customSessionId})
const
factory
ReceiveMessage.userMessage({required bool fromText, required bool interim, required Message message, required Models models, required TimeRange time, String? customSessionId})
const
factory

Properties

copyWith → $ReceiveMessageCopyWith<ReceiveMessage>
Create a copy of ReceiveMessage with the given fields replaced by the non-null parameter values.
no setterinherited
customSessionId String?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult assistantEnd(AssistantEnd value), required TResult assistantMessage(AssistantMessage value), required TResult assistantProsody(AssistantProsody value), required TResult audioOutput(AudioOutput value), required TResult chatMetadata(ChatMetadata value), required TResult error(ReceiveMessageError value), required TResult userInterruption(UserInterruption value), required TResult userMessage(UserMessage value), required TResult toolCall(ToolCallMessage value), required TResult toolResponse(ToolResponseMessage value), required TResult toolError(ToolErrorMessage value)}) → TResult

Available on ReceiveMessage, provided by the ReceiveMessagePatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? assistantEnd(AssistantEnd value)?, TResult? assistantMessage(AssistantMessage value)?, TResult? assistantProsody(AssistantProsody value)?, TResult? audioOutput(AudioOutput value)?, TResult? chatMetadata(ChatMetadata value)?, TResult? error(ReceiveMessageError value)?, TResult? userInterruption(UserInterruption value)?, TResult? userMessage(UserMessage value)?, TResult? toolCall(ToolCallMessage value)?, TResult? toolResponse(ToolResponseMessage value)?, TResult? toolError(ToolErrorMessage value)?}) → TResult?

Available on ReceiveMessage, provided by the ReceiveMessagePatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult assistantEnd(AssistantEnd value)?, TResult assistantMessage(AssistantMessage value)?, TResult assistantProsody(AssistantProsody value)?, TResult audioOutput(AudioOutput value)?, TResult chatMetadata(ChatMetadata value)?, TResult error(ReceiveMessageError value)?, TResult userInterruption(UserInterruption value)?, TResult userMessage(UserMessage value)?, TResult toolCall(ToolCallMessage value)?, TResult toolResponse(ToolResponseMessage value)?, TResult toolError(ToolErrorMessage value)?, required TResult orElse()}) → TResult

Available on ReceiveMessage, provided by the ReceiveMessagePatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult assistantEnd(String? customSessionId)?, TResult assistantMessage(bool fromText, Message message, Models models, String? customSessionId, String? id)?, TResult assistantProsody(Models models, String? customSessionId, String? id)?, TResult audioOutput(String data, String id, int index, String? customSessionId)?, TResult chatMetadata(String chatGroupId, String chatId, String? requestId, String? customSessionId)?, TResult error(String code, String message, String slug, String? customSessionId, String? requestId)?, TResult userInterruption(int time, String? customSessionId)?, TResult userMessage(bool fromText, bool interim, Message message, Models models, TimeRange time, String? customSessionId)?, TResult toolCall(String name, String parameters, bool responseRequired, String toolCallId, String? customSessionId, String? toolType)?, TResult toolResponse(String content, String toolCallId, String? customSessionId, String? toolName, String? toolType)?, TResult toolError(String error, String toolCallId, String? code, String? content, String? customSessionId, String? level, String? toolType)?, required TResult orElse()}) → TResult

Available on ReceiveMessage, provided by the ReceiveMessagePatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this ReceiveMessage to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult assistantEnd(String? customSessionId), required TResult assistantMessage(bool fromText, Message message, Models models, String? customSessionId, String? id), required TResult assistantProsody(Models models, String? customSessionId, String? id), required TResult audioOutput(String data, String id, int index, String? customSessionId), required TResult chatMetadata(String chatGroupId, String chatId, String? requestId, String? customSessionId), required TResult error(String code, String message, String slug, String? customSessionId, String? requestId), required TResult userInterruption(int time, String? customSessionId), required TResult userMessage(bool fromText, bool interim, Message message, Models models, TimeRange time, String? customSessionId), required TResult toolCall(String name, String parameters, bool responseRequired, String toolCallId, String? customSessionId, String? toolType), required TResult toolResponse(String content, String toolCallId, String? customSessionId, String? toolName, String? toolType), required TResult toolError(String error, String toolCallId, String? code, String? content, String? customSessionId, String? level, String? toolType)}) → TResult

Available on ReceiveMessage, provided by the ReceiveMessagePatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? assistantEnd(String? customSessionId)?, TResult? assistantMessage(bool fromText, Message message, Models models, String? customSessionId, String? id)?, TResult? assistantProsody(Models models, String? customSessionId, String? id)?, TResult? audioOutput(String data, String id, int index, String? customSessionId)?, TResult? chatMetadata(String chatGroupId, String chatId, String? requestId, String? customSessionId)?, TResult? error(String code, String message, String slug, String? customSessionId, String? requestId)?, TResult? userInterruption(int time, String? customSessionId)?, TResult? userMessage(bool fromText, bool interim, Message message, Models models, TimeRange time, String? customSessionId)?, TResult? toolCall(String name, String parameters, bool responseRequired, String toolCallId, String? customSessionId, String? toolType)?, TResult? toolResponse(String content, String toolCallId, String? customSessionId, String? toolName, String? toolType)?, TResult? toolError(String error, String toolCallId, String? code, String? content, String? customSessionId, String? level, String? toolType)?}) → TResult?

Available on ReceiveMessage, provided by the ReceiveMessagePatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited