<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogImage implements \JsonSerializable { private $name; private $url; private $caption; private $photoStudioOrderId; public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getUrl(): ?string { return $this->url; } public function setUrl(?string $url): void { $this->url = $url; } public function getCaption(): ?string { return $this->caption; } public function setCaption(?string $caption): void { $this->caption = $caption; } public function getPhotoStudioOrderId(): ?string { return $this->photoStudioOrderId; } public function setPhotoStudioOrderId(?string $photoStudioOrderId): void { $this->photoStudioOrderId = $photoStudioOrderId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->url)) { $json['url'] = $this->url; } if (isset($this->caption)) { $json['caption'] = $this->caption; } if (isset($this->photoStudioOrderId)) { $json['photo_studio_order_id'] = $this->photoStudioOrderId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 