<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class WorkweekConfig implements \JsonSerializable { private $id; private $startOfWeek; private $startOfDayLocalTime; private $version; private $createdAt; private $updatedAt; public function __construct(string $startOfWeek, string $startOfDayLocalTime) { $this->startOfWeek = $startOfWeek; $this->startOfDayLocalTime = $startOfDayLocalTime; } public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getStartOfWeek(): string { return $this->startOfWeek; } public function setStartOfWeek(string $startOfWeek): void { $this->startOfWeek = $startOfWeek; } public function getStartOfDayLocalTime(): string { return $this->startOfDayLocalTime; } public function setStartOfDayLocalTime(string $startOfDayLocalTime): void { $this->startOfDayLocalTime = $startOfDayLocalTime; } 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; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } $json['start_of_week'] = $this->startOfWeek; $json['start_of_day_local_time'] = $this->startOfDayLocalTime; 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; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 