<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogQuery implements \JsonSerializable { private $sortedAttributeQuery; private $exactQuery; private $setQuery; private $prefixQuery; private $rangeQuery; private $textQuery; private $itemsForTaxQuery; private $itemsForModifierListQuery; private $itemsForItemOptionsQuery; private $itemVariationsForItemOptionValuesQuery; public function getSortedAttributeQuery(): ?CatalogQuerySortedAttribute { return $this->sortedAttributeQuery; } public function setSortedAttributeQuery(?CatalogQuerySortedAttribute $sortedAttributeQuery): void { $this->sortedAttributeQuery = $sortedAttributeQuery; } public function getExactQuery(): ?CatalogQueryExact { return $this->exactQuery; } public function setExactQuery(?CatalogQueryExact $exactQuery): void { $this->exactQuery = $exactQuery; } public function getSetQuery(): ?CatalogQuerySet { return $this->setQuery; } public function setSetQuery(?CatalogQuerySet $setQuery): void { $this->setQuery = $setQuery; } public function getPrefixQuery(): ?CatalogQueryPrefix { return $this->prefixQuery; } public function setPrefixQuery(?CatalogQueryPrefix $prefixQuery): void { $this->prefixQuery = $prefixQuery; } public function getRangeQuery(): ?CatalogQueryRange { return $this->rangeQuery; } public function setRangeQuery(?CatalogQueryRange $rangeQuery): void { $this->rangeQuery = $rangeQuery; } public function getTextQuery(): ?CatalogQueryText { return $this->textQuery; } public function setTextQuery(?CatalogQueryText $textQuery): void { $this->textQuery = $textQuery; } public function getItemsForTaxQuery(): ?CatalogQueryItemsForTax { return $this->itemsForTaxQuery; } public function setItemsForTaxQuery(?CatalogQueryItemsForTax $itemsForTaxQuery): void { $this->itemsForTaxQuery = $itemsForTaxQuery; } public function getItemsForModifierListQuery(): ?CatalogQueryItemsForModifierList { return $this->itemsForModifierListQuery; } public function setItemsForModifierListQuery(?CatalogQueryItemsForModifierList $itemsForModifierListQuery): void { $this->itemsForModifierListQuery = $itemsForModifierListQuery; } public function getItemsForItemOptionsQuery(): ?CatalogQueryItemsForItemOptions { return $this->itemsForItemOptionsQuery; } public function setItemsForItemOptionsQuery(?CatalogQueryItemsForItemOptions $itemsForItemOptionsQuery): void { $this->itemsForItemOptionsQuery = $itemsForItemOptionsQuery; } public function getItemVariationsForItemOptionValuesQuery(): ?CatalogQueryItemVariationsForItemOptionValues { return $this->itemVariationsForItemOptionValuesQuery; } public function setItemVariationsForItemOptionValuesQuery( ?CatalogQueryItemVariationsForItemOptionValues $itemVariationsForItemOptionValuesQuery ): void { $this->itemVariationsForItemOptionValuesQuery = $itemVariationsForItemOptionValuesQuery; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->sortedAttributeQuery)) { $json['sorted_attribute_query'] = $this->sortedAttributeQuery; } if (isset($this->exactQuery)) { $json['exact_query'] = $this->exactQuery; } if (isset($this->setQuery)) { $json['set_query'] = $this->setQuery; } if (isset($this->prefixQuery)) { $json['prefix_query'] = $this->prefixQuery; } if (isset($this->rangeQuery)) { $json['range_query'] = $this->rangeQuery; } if (isset($this->textQuery)) { $json['text_query'] = $this->textQuery; } if (isset($this->itemsForTaxQuery)) { $json['items_for_tax_query'] = $this->itemsForTaxQuery; } if (isset($this->itemsForModifierListQuery)) { $json['items_for_modifier_list_query'] = $this->itemsForModifierListQuery; } if (isset($this->itemsForItemOptionsQuery)) { $json['items_for_item_options_query'] = $this->itemsForItemOptionsQuery; } if (isset($this->itemVariationsForItemOptionValuesQuery)) { $json['item_variations_for_item_option_values_query'] = $this->itemVariationsForItemOptionValuesQuery; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 