<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CustomAttribute implements \JsonSerializable { private $key; private $value; private $version; private $visibility; private $definition; private $updatedAt; private $createdAt; public function getKey(): ?string { return $this->key; } public function setKey(?string $key): void { $this->key = $key; } public function getValue() { return $this->value; } public function setValue($value): void { $this->value = $value; } public function getVersion(): ?int { return $this->version; } public function setVersion(?int $version): void { $this->version = $version; } public function getVisibility(): ?string { return $this->visibility; } public function setVisibility(?string $visibility): void { $this->visibility = $visibility; } public function getDefinition(): ?CustomAttributeDefinition { return $this->definition; } public function setDefinition(?CustomAttributeDefinition $definition): void { $this->definition = $definition; } public function getUpdatedAt(): ?string { return $this->updatedAt; } public function setUpdatedAt(?string $updatedAt): void { $this->updatedAt = $updatedAt; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->key)) { $json['key'] = $this->key; } if (isset($this->value)) { $json['value'] = $this->value; } if (isset($this->version)) { $json['version'] = $this->version; } if (isset($this->visibility)) { $json['visibility'] = $this->visibility; } if (isset($this->definition)) { $json['definition'] = $this->definition; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 