<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class BatchRetrieveCatalogObjectsResponse implements \JsonSerializable { private $errors; private $objects; private $relatedObjects; public function getErrors(): ?array { return $this->errors; } public function setErrors(?array $errors): void { $this->errors = $errors; } public function getObjects(): ?array { return $this->objects; } public function setObjects(?array $objects): void { $this->objects = $objects; } public function getRelatedObjects(): ?array { return $this->relatedObjects; } public function setRelatedObjects(?array $relatedObjects): void { $this->relatedObjects = $relatedObjects; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->errors)) { $json['errors'] = $this->errors; } if (isset($this->objects)) { $json['objects'] = $this->objects; } if (isset($this->relatedObjects)) { $json['related_objects'] = $this->relatedObjects; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 