UnknownClientMessage class

Unknown client message type.

This is returned when deserializing a message type that this client version doesn't recognize. This allows graceful handling of future API additions without crashing.

Applications can check for this type and handle it appropriately:

final message = BidiGenerateContentClientMessage.fromJson(json);
if (message is UnknownClientMessage) {
  // Log or ignore unrecognized message type
  print('Unknown message: ${message.rawJson.keys}');
}
Inheritance

Constructors

UnknownClientMessage(Map<String, dynamic> rawJson)
Creates an UnknownClientMessage.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
rawJson Map<String, dynamic>
The raw JSON of the unrecognized message.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON with the message type wrapper key.
override
toString() String
A string representation of this object.
override

Operators

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