<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class SearchAvailabilityRequest implements \JsonSerializable { private $query; public function __construct(SearchAvailabilityQuery $query) { $this->query = $query; } public function getQuery(): SearchAvailabilityQuery { return $this->query; } public function setQuery(SearchAvailabilityQuery $query): void { $this->query = $query; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['query'] = $this->query; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 