<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class Shift implements \JsonSerializable { private $id; private $employeeId; private $locationId; private $timezone; private $startAt; private $endAt; private $wage; private $breaks; private $status; private $version; private $createdAt; private $updatedAt; private $teamMemberId; public function __construct(string $startAt) { $this->startAt = $startAt; } public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getEmployeeId(): ?string { return $this->employeeId; } public function setEmployeeId(?string $employeeId): void { $this->employeeId = $employeeId; } public function getLocationId(): ?string { return $this->locationId; } public function setLocationId(?string $locationId): void { $this->locationId = $locationId; } public function getTimezone(): ?string { return $this->timezone; } public function setTimezone(?string $timezone): void { $this->timezone = $timezone; } public function getStartAt(): string { return $this->startAt; } public function setStartAt(string $startAt): void { $this->startAt = $startAt; } public function getEndAt(): ?string { return $this->endAt; } public function setEndAt(?string $endAt): void { $this->endAt = $endAt; } public function getWage(): ?ShiftWage { return $this->wage; } public function setWage(?ShiftWage $wage): void { $this->wage = $wage; } public function getBreaks(): ?array { return $this->breaks; } public function setBreaks(?array $breaks): void { $this->breaks = $breaks; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } public function getVersion(): ?int { return $this->version; } public function setVersion(?int $version): void { $this->version = $version; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } public function getUpdatedAt(): ?string { return $this->updatedAt; } public function setUpdatedAt(?string $updatedAt): void { $this->updatedAt = $updatedAt; } public function getTeamMemberId(): ?string { return $this->teamMemberId; } public function setTeamMemberId(?string $teamMemberId): void { $this->teamMemberId = $teamMemberId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->employeeId)) { $json['employee_id'] = $this->employeeId; } if (isset($this->locationId)) { $json['location_id'] = $this->locationId; } if (isset($this->timezone)) { $json['timezone'] = $this->timezone; } $json['start_at'] = $this->startAt; if (isset($this->endAt)) { $json['end_at'] = $this->endAt; } if (isset($this->wage)) { $json['wage'] = $this->wage; } if (isset($this->breaks)) { $json['breaks'] = $this->breaks; } if (isset($this->status)) { $json['status'] = $this->status; } if (isset($this->version)) { $json['version'] = $this->version; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->teamMemberId)) { $json['team_member_id'] = $this->teamMemberId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 