<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class Site implements \JsonSerializable { private $id; private $siteTitle; private $domain; private $isPublished; private $createdAt; private $updatedAt; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getSiteTitle(): ?string { return $this->siteTitle; } public function setSiteTitle(?string $siteTitle): void { $this->siteTitle = $siteTitle; } public function getDomain(): ?string { return $this->domain; } public function setDomain(?string $domain): void { $this->domain = $domain; } public function getIsPublished(): ?bool { return $this->isPublished; } public function setIsPublished(?bool $isPublished): void { $this->isPublished = $isPublished; } 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; } if (isset($this->siteTitle)) { $json['site_title'] = $this->siteTitle; } if (isset($this->domain)) { $json['domain'] = $this->domain; } if (isset($this->isPublished)) { $json['is_published'] = $this->isPublished; } 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; } } 