serialize method

  1. @override
void serialize(
  1. List<int> buffer
)
override

Serialize.

Implementation

@override
void serialize(List<int> buffer) {
  // Write type-id 0xa04e8d3a.
  buffer.writeInt32(0xa04e8d3a);

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeInt32(flags2);
  buffer.writeInt64(id);
  buffer.writeString(about);
  final localParticipantsCountCopy = participantsCount;
  if (localParticipantsCountCopy != null) {
    buffer.writeInt32(localParticipantsCountCopy);
  }
  final localAdminsCountCopy = adminsCount;
  if (localAdminsCountCopy != null) {
    buffer.writeInt32(localAdminsCountCopy);
  }
  final localKickedCountCopy = kickedCount;
  if (localKickedCountCopy != null) {
    buffer.writeInt32(localKickedCountCopy);
  }
  final localBannedCountCopy = bannedCount;
  if (localBannedCountCopy != null) {
    buffer.writeInt32(localBannedCountCopy);
  }
  final localOnlineCountCopy = onlineCount;
  if (localOnlineCountCopy != null) {
    buffer.writeInt32(localOnlineCountCopy);
  }
  buffer.writeInt32(readInboxMaxId);
  buffer.writeInt32(readOutboxMaxId);
  buffer.writeInt32(unreadCount);
  buffer.writeObject(chatPhoto);
  buffer.writeObject(notifySettings);
  final localExportedInviteCopy = exportedInvite;
  if (localExportedInviteCopy != null) {
    buffer.writeObject(localExportedInviteCopy);
  }
  buffer.writeVectorObject(botInfo);
  final localMigratedFromChatIdCopy = migratedFromChatId;
  if (localMigratedFromChatIdCopy != null) {
    buffer.writeInt64(localMigratedFromChatIdCopy);
  }
  final localMigratedFromMaxIdCopy = migratedFromMaxId;
  if (localMigratedFromMaxIdCopy != null) {
    buffer.writeInt32(localMigratedFromMaxIdCopy);
  }
  final localPinnedMsgIdCopy = pinnedMsgId;
  if (localPinnedMsgIdCopy != null) {
    buffer.writeInt32(localPinnedMsgIdCopy);
  }
  final localStickersetCopy = stickerset;
  if (localStickersetCopy != null) {
    buffer.writeObject(localStickersetCopy);
  }
  final localAvailableMinIdCopy = availableMinId;
  if (localAvailableMinIdCopy != null) {
    buffer.writeInt32(localAvailableMinIdCopy);
  }
  final localFolderIdCopy = folderId;
  if (localFolderIdCopy != null) {
    buffer.writeInt32(localFolderIdCopy);
  }
  final localLinkedChatIdCopy = linkedChatId;
  if (localLinkedChatIdCopy != null) {
    buffer.writeInt64(localLinkedChatIdCopy);
  }
  final localLocationCopy = location;
  if (localLocationCopy != null) {
    buffer.writeObject(localLocationCopy);
  }
  final localSlowmodeSecondsCopy = slowmodeSeconds;
  if (localSlowmodeSecondsCopy != null) {
    buffer.writeInt32(localSlowmodeSecondsCopy);
  }
  final localSlowmodeNextSendDateCopy = slowmodeNextSendDate;
  if (localSlowmodeNextSendDateCopy != null) {
    buffer.writeDateTime(localSlowmodeNextSendDateCopy);
  }
  final localStatsDcCopy = statsDc;
  if (localStatsDcCopy != null) {
    buffer.writeInt32(localStatsDcCopy);
  }
  buffer.writeInt32(pts);
  final localCallCopy = call;
  if (localCallCopy != null) {
    buffer.writeObject(localCallCopy);
  }
  final localTtlPeriodCopy = ttlPeriod;
  if (localTtlPeriodCopy != null) {
    buffer.writeInt32(localTtlPeriodCopy);
  }
  final localPendingSuggestionsCopy = pendingSuggestions;
  if (localPendingSuggestionsCopy != null) {
    buffer.writeVectorString(localPendingSuggestionsCopy);
  }
  final localGroupcallDefaultJoinAsCopy = groupcallDefaultJoinAs;
  if (localGroupcallDefaultJoinAsCopy != null) {
    buffer.writeObject(localGroupcallDefaultJoinAsCopy);
  }
  final localThemeEmoticonCopy = themeEmoticon;
  if (localThemeEmoticonCopy != null) {
    buffer.writeString(localThemeEmoticonCopy);
  }
  final localRequestsPendingCopy = requestsPending;
  if (localRequestsPendingCopy != null) {
    buffer.writeInt32(localRequestsPendingCopy);
  }
  final localRecentRequestersCopy = recentRequesters;
  if (localRecentRequestersCopy != null) {
    buffer.writeVectorInt64(localRecentRequestersCopy);
  }
  final localDefaultSendAsCopy = defaultSendAs;
  if (localDefaultSendAsCopy != null) {
    buffer.writeObject(localDefaultSendAsCopy);
  }
  final localAvailableReactionsCopy = availableReactions;
  if (localAvailableReactionsCopy != null) {
    buffer.writeObject(localAvailableReactionsCopy);
  }
  final localReactionsLimitCopy = reactionsLimit;
  if (localReactionsLimitCopy != null) {
    buffer.writeInt32(localReactionsLimitCopy);
  }
  final localStoriesCopy = stories;
  if (localStoriesCopy != null) {
    buffer.writeObject(localStoriesCopy);
  }
  final localWallpaperCopy = wallpaper;
  if (localWallpaperCopy != null) {
    buffer.writeObject(localWallpaperCopy);
  }
  final localBoostsAppliedCopy = boostsApplied;
  if (localBoostsAppliedCopy != null) {
    buffer.writeInt32(localBoostsAppliedCopy);
  }
  final localBoostsUnrestrictCopy = boostsUnrestrict;
  if (localBoostsUnrestrictCopy != null) {
    buffer.writeInt32(localBoostsUnrestrictCopy);
  }
  final localEmojisetCopy = emojiset;
  if (localEmojisetCopy != null) {
    buffer.writeObject(localEmojisetCopy);
  }
  final localBotVerificationCopy = botVerification;
  if (localBotVerificationCopy != null) {
    buffer.writeObject(localBotVerificationCopy);
  }
  final localStargiftsCountCopy = stargiftsCount;
  if (localStargiftsCountCopy != null) {
    buffer.writeInt32(localStargiftsCountCopy);
  }
  final localSendPaidMessagesStarsCopy = sendPaidMessagesStars;
  if (localSendPaidMessagesStarsCopy != null) {
    buffer.writeInt64(localSendPaidMessagesStarsCopy);
  }
  final localMainTabCopy = mainTab;
  if (localMainTabCopy != null) {
    buffer.writeObject(localMainTabCopy);
  }
  final localGuardBotIdCopy = guardBotId;
  if (localGuardBotIdCopy != null) {
    buffer.writeInt64(localGuardBotIdCopy);
  }

  // Finished serialization.
}