AccountUpdateBusinessWorkHours.deserialize constructor

AccountUpdateBusinessWorkHours.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory AccountUpdateBusinessWorkHours.deserialize(BinaryReader reader) {
  // Read [AccountUpdateBusinessWorkHours] fields.
  final flags = reader.readInt32();
  final hasBusinessWorkHoursField = (flags & 1) != 0;
  final businessWorkHours = hasBusinessWorkHoursField
      ? reader.readObject() as BusinessWorkHoursBase
      : null;

  // Construct [AccountUpdateBusinessWorkHours] object.
  final returnValue = AccountUpdateBusinessWorkHours(
    businessWorkHours: businessWorkHours,
  );

  // Now return the deserialized [AccountUpdateBusinessWorkHours].
  return returnValue;
}