<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class BreakType implements \JsonSerializable { private $id; private $locationId; private $breakName; private $expectedDuration; private $isPaid; private $version; private $createdAt; private $updatedAt; public function __construct(string $locationId, string $breakName, string $expectedDuration, bool $isPaid) { $this->locationId = $locationId; $this->breakName = $breakName; $this->expectedDuration = $expectedDuration; $this->isPaid = $isPaid; } public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getLocationId(): string { return $this->locationId; } public function setLocationId(string $locationId): void { $this->locationId = $locationId; } public function getBreakName(): string { return $this->breakName; } public function setBreakName(string $breakName): void { $this->breakName = $breakName; } public function getExpectedDuration(): string { return $this->expectedDuration; } public function setExpectedDuration(string $expectedDuration): void { $this->expectedDuration = $expectedDuration; } public function getIsPaid(): bool { return $this->isPaid; } public function setIsPaid(bool $isPaid): void { $this->isPaid = $isPaid; } public function getVersion(): ?int { return $this->version; } public function setVersion(?int $version): void { $this->version = $version; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } public function getUpdatedAt(): ?string { return $this->updatedAt; } public function setUpdatedAt(?string $updatedAt): void { $this->updatedAt = $updatedAt; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } $json['location_id'] = $this->locationId; $json['break_name'] = $this->breakName; $json['expected_duration'] = $this->expectedDuration; $json['is_paid'] = $this->isPaid; if (isset($this->version)) { $json['version'] = $this->version; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 