<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogItemModifierListInfo implements \JsonSerializable { private $modifierListId; private $modifierOverrides; private $minSelectedModifiers; private $maxSelectedModifiers; private $enabled; public function __construct(string $modifierListId) { $this->modifierListId = $modifierListId; } public function getModifierListId(): string { return $this->modifierListId; } public function setModifierListId(string $modifierListId): void { $this->modifierListId = $modifierListId; } public function getModifierOverrides(): ?array { return $this->modifierOverrides; } public function setModifierOverrides(?array $modifierOverrides): void { $this->modifierOverrides = $modifierOverrides; } public function getMinSelectedModifiers(): ?int { return $this->minSelectedModifiers; } public function setMinSelectedModifiers(?int $minSelectedModifiers): void { $this->minSelectedModifiers = $minSelectedModifiers; } public function getMaxSelectedModifiers(): ?int { return $this->maxSelectedModifiers; } public function setMaxSelectedModifiers(?int $maxSelectedModifiers): void { $this->maxSelectedModifiers = $maxSelectedModifiers; } public function getEnabled(): ?bool { return $this->enabled; } public function setEnabled(?bool $enabled): void { $this->enabled = $enabled; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['modifier_list_id'] = $this->modifierListId; if (isset($this->modifierOverrides)) { $json['modifier_overrides'] = $this->modifierOverrides; } if (isset($this->minSelectedModifiers)) { $json['min_selected_modifiers'] = $this->minSelectedModifiers; } if (isset($this->maxSelectedModifiers)) { $json['max_selected_modifiers'] = $this->maxSelectedModifiers; } if (isset($this->enabled)) { $json['enabled'] = $this->enabled; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 