<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class ShiftFilter implements \JsonSerializable { private $locationIds; private $employeeIds; private $status; private $start; private $end; private $workday; private $teamMemberIds; public function __construct(array $locationIds, array $teamMemberIds) { $this->locationIds = $locationIds; $this->teamMemberIds = $teamMemberIds; } public function getLocationIds(): array { return $this->locationIds; } public function setLocationIds(array $locationIds): void { $this->locationIds = $locationIds; } public function getEmployeeIds(): ?array { return $this->employeeIds; } public function setEmployeeIds(?array $employeeIds): void { $this->employeeIds = $employeeIds; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } public function getStart(): ?TimeRange { return $this->start; } public function setStart(?TimeRange $start): void { $this->start = $start; } public function getEnd(): ?TimeRange { return $this->end; } public function setEnd(?TimeRange $end): void { $this->end = $end; } public function getWorkday(): ?ShiftWorkday { return $this->workday; } public function setWorkday(?ShiftWorkday $workday): void { $this->workday = $workday; } public function getTeamMemberIds(): array { return $this->teamMemberIds; } public function setTeamMemberIds(array $teamMemberIds): void { $this->teamMemberIds = $teamMemberIds; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['location_ids'] = $this->locationIds; if (isset($this->employeeIds)) { $json['employee_ids'] = $this->employeeIds; } if (isset($this->status)) { $json['status'] = $this->status; } if (isset($this->start)) { $json['start'] = $this->start; } if (isset($this->end)) { $json['end'] = $this->end; } if (isset($this->workday)) { $json['workday'] = $this->workday; } $json['team_member_ids'] = $this->teamMemberIds; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 