serialize method
Serialize.
Implementation
@override
void serialize(List<int> buffer) {
// Write type-id 0x033ed001.
buffer.writeInt32(0x033ed001);
// Write fields.
buffer.writeInt32(flags);
buffer.writeInt64(botId);
buffer.writeObject(recipients);
buffer.writeObject(rights);
final localDeviceCopy = device;
if (localDeviceCopy != null) {
buffer.writeString(localDeviceCopy);
}
final localDateCopy = date;
if (localDateCopy != null) {
buffer.writeDateTime(localDateCopy);
}
final localLocationCopy = location;
if (localLocationCopy != null) {
buffer.writeString(localLocationCopy);
}
// Finished serialization.
}