<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class Booking implements \JsonSerializable { private $id; private $version; private $status; private $createdAt; private $updatedAt; private $startAt; private $locationId; private $customerId; private $customerNote; private $sellerNote; private $appointmentSegments; private $transitionTimeMinutes; private $allDay; private $locationType; private $creatorDetails; private $source; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getVersion(): ?int { return $this->version; } public function setVersion(?int $version): void { $this->version = $version; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } 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; } public function getStartAt(): ?string { return $this->startAt; } public function setStartAt(?string $startAt): void { $this->startAt = $startAt; } public function getLocationId(): ?string { return $this->locationId; } public function setLocationId(?string $locationId): void { $this->locationId = $locationId; } public function getCustomerId(): ?string { return $this->customerId; } public function setCustomerId(?string $customerId): void { $this->customerId = $customerId; } public function getCustomerNote(): ?string { return $this->customerNote; } public function setCustomerNote(?string $customerNote): void { $this->customerNote = $customerNote; } public function getSellerNote(): ?string { return $this->sellerNote; } public function setSellerNote(?string $sellerNote): void { $this->sellerNote = $sellerNote; } public function getAppointmentSegments(): ?array { return $this->appointmentSegments; } public function setAppointmentSegments(?array $appointmentSegments): void { $this->appointmentSegments = $appointmentSegments; } public function getTransitionTimeMinutes(): ?int { return $this->transitionTimeMinutes; } public function setTransitionTimeMinutes(?int $transitionTimeMinutes): void { $this->transitionTimeMinutes = $transitionTimeMinutes; } public function getAllDay(): ?bool { return $this->allDay; } public function setAllDay(?bool $allDay): void { $this->allDay = $allDay; } public function getLocationType(): ?string { return $this->locationType; } public function setLocationType(?string $locationType): void { $this->locationType = $locationType; } public function getCreatorDetails(): ?BookingCreatorDetails { return $this->creatorDetails; } public function setCreatorDetails(?BookingCreatorDetails $creatorDetails): void { $this->creatorDetails = $creatorDetails; } public function getSource(): ?string { return $this->source; } public function setSource(?string $source): void { $this->source = $source; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->version)) { $json['version'] = $this->version; } if (isset($this->status)) { $json['status'] = $this->status; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->startAt)) { $json['start_at'] = $this->startAt; } if (isset($this->locationId)) { $json['location_id'] = $this->locationId; } if (isset($this->customerId)) { $json['customer_id'] = $this->customerId; } if (isset($this->customerNote)) { $json['customer_note'] = $this->customerNote; } if (isset($this->sellerNote)) { $json['seller_note'] = $this->sellerNote; } if (isset($this->appointmentSegments)) { $json['appointment_segments'] = $this->appointmentSegments; } if (isset($this->transitionTimeMinutes)) { $json['transition_time_minutes'] = $this->transitionTimeMinutes; } if (isset($this->allDay)) { $json['all_day'] = $this->allDay; } if (isset($this->locationType)) { $json['location_type'] = $this->locationType; } if (isset($this->creatorDetails)) { $json['creator_details'] = $this->creatorDetails; } if (isset($this->source)) { $json['source'] = $this->source; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 