<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class UpdateLocationRequest implements \JsonSerializable { private $location; public function getLocation(): ?Location { return $this->location; } public function setLocation(?Location $location): void { $this->location = $location; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->location)) { $json['location'] = $this->location; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 