$deviceOneTimeKeysCount */ public function __construct( private string $nextBatch, private ?AccountData $accountData = null, private ?DeviceLists $deviceLists = null, private ?array $deviceOneTimeKeysCount = null, private ?Presence $presence = null, private ?Rooms $rooms = null, private ?ToDevice $toDevice = null, ) {} public function getBody(): array { return array_filter([ "account_data" => $this->accountData, "device_lists" => $this->deviceLists, "device_one_time_keys_count" => $this->deviceOneTimeKeysCount, "next_batch" => $this->nextBatch, "presence" => $this->presence, "rooms" => $this->rooms, "to_device" => $this->toDevice, ], fn ($value) => ! is_null($value)); } }