<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class FilterValue implements \JsonSerializable { private $all; private $any; private $none; public function getAll(): ?array { return $this->all; } public function setAll(?array $all): void { $this->all = $all; } public function getAny(): ?array { return $this->any; } public function setAny(?array $any): void { $this->any = $any; } public function getNone(): ?array { return $this->none; } public function setNone(?array $none): void { $this->none = $none; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->all)) { $json['all'] = $this->all; } if (isset($this->any)) { $json['any'] = $this->any; } if (isset($this->none)) { $json['none'] = $this->none; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 