<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogCustomAttributeValue implements \JsonSerializable { private $name; private $stringValue; private $customAttributeDefinitionId; private $type; private $numberValue; private $booleanValue; private $selectionUidValues; private $key; public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getStringValue(): ?string { return $this->stringValue; } public function setStringValue(?string $stringValue): void { $this->stringValue = $stringValue; } public function getCustomAttributeDefinitionId(): ?string { return $this->customAttributeDefinitionId; } public function setCustomAttributeDefinitionId(?string $customAttributeDefinitionId): void { $this->customAttributeDefinitionId = $customAttributeDefinitionId; } public function getType(): ?string { return $this->type; } public function setType(?string $type): void { $this->type = $type; } public function getNumberValue(): ?string { return $this->numberValue; } public function setNumberValue(?string $numberValue): void { $this->numberValue = $numberValue; } public function getBooleanValue(): ?bool { return $this->booleanValue; } public function setBooleanValue(?bool $booleanValue): void { $this->booleanValue = $booleanValue; } public function getSelectionUidValues(): ?array { return $this->selectionUidValues; } public function setSelectionUidValues(?array $selectionUidValues): void { $this->selectionUidValues = $selectionUidValues; } public function getKey(): ?string { return $this->key; } public function setKey(?string $key): void { $this->key = $key; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->stringValue)) { $json['string_value'] = $this->stringValue; } if (isset($this->customAttributeDefinitionId)) { $json['custom_attribute_definition_id'] = $this->customAttributeDefinitionId; } if (isset($this->type)) { $json['type'] = $this->type; } if (isset($this->numberValue)) { $json['number_value'] = $this->numberValue; } if (isset($this->booleanValue)) { $json['boolean_value'] = $this->booleanValue; } if (isset($this->selectionUidValues)) { $json['selection_uid_values'] = $this->selectionUidValues; } if (isset($this->key)) { $json['key'] = $this->key; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 