<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogIdMapping implements \JsonSerializable { private $clientObjectId; private $objectId; public function getClientObjectId(): ?string { return $this->clientObjectId; } public function setClientObjectId(?string $clientObjectId): void { $this->clientObjectId = $clientObjectId; } public function getObjectId(): ?string { return $this->objectId; } public function setObjectId(?string $objectId): void { $this->objectId = $objectId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->clientObjectId)) { $json['client_object_id'] = $this->clientObjectId; } if (isset($this->objectId)) { $json['object_id'] = $this->objectId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 