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