ReceiveMessage class sealed
- Available extensions
- Annotations
-
- @Freezed.new(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)
Constructors
- ReceiveMessage.assistantEnd({String? customSessionId})
-
constfactory
- ReceiveMessage.assistantMessage({required bool fromText, required Message message, required Models models, String? customSessionId, String? id})
-
constfactory
- ReceiveMessage.assistantProsody({required Models models, String? customSessionId, String? id})
-
constfactory
- ReceiveMessage.audioOutput({required String data, required String id, required int index, String? customSessionId})
-
constfactory
- ReceiveMessage.chatMetadata({required String chatGroupId, required String chatId, String? requestId, String? customSessionId})
-
constfactory
- ReceiveMessage.error({required String code, required String message, required String slug, String? customSessionId, String? requestId})
-
constfactory
-
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})
-
constfactory
- ReceiveMessage.toolError({required String error, required String toolCallId, String? code, String? content, String? customSessionId, String? level, String? toolType})
-
constfactory
- ReceiveMessage.toolResponse({required String content, required String toolCallId, String? customSessionId, String? toolName, String? toolType})
-
constfactory
- ReceiveMessage.userInterruption({required int time, String? customSessionId})
-
constfactory
- ReceiveMessage.userMessage({required bool fromText, required bool interim, required Message message, required Models models, required TimeRange time, String? customSessionId})
-
constfactory
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
Aswitch-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 ofmapthat fallback to returningnull. -
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 ofmapthat fallback to returningorElse. -
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 ofwhenthat fallback to anorElsecallback. -
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
Aswitch-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 ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited