<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class AppointmentSegment implements \JsonSerializable { private $durationMinutes; private $serviceVariationId; private $teamMemberId; private $serviceVariationVersion; private $intermissionMinutes; private $anyTeamMember; private $resourceIds; public function __construct(string $teamMemberId) { $this->teamMemberId = $teamMemberId; } public function getDurationMinutes(): ?int { return $this->durationMinutes; } public function setDurationMinutes(?int $durationMinutes): void { $this->durationMinutes = $durationMinutes; } public function getServiceVariationId(): ?string { return $this->serviceVariationId; } public function setServiceVariationId(?string $serviceVariationId): void { $this->serviceVariationId = $serviceVariationId; } public function getTeamMemberId(): string { return $this->teamMemberId; } public function setTeamMemberId(string $teamMemberId): void { $this->teamMemberId = $teamMemberId; } public function getServiceVariationVersion(): ?int { return $this->serviceVariationVersion; } public function setServiceVariationVersion(?int $serviceVariationVersion): void { $this->serviceVariationVersion = $serviceVariationVersion; } public function getIntermissionMinutes(): ?int { return $this->intermissionMinutes; } public function setIntermissionMinutes(?int $intermissionMinutes): void { $this->intermissionMinutes = $intermissionMinutes; } public function getAnyTeamMember(): ?bool { return $this->anyTeamMember; } public function setAnyTeamMember(?bool $anyTeamMember): void { $this->anyTeamMember = $anyTeamMember; } public function getResourceIds(): ?array { return $this->resourceIds; } public function setResourceIds(?array $resourceIds): void { $this->resourceIds = $resourceIds; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->durationMinutes)) { $json['duration_minutes'] = $this->durationMinutes; } if (isset($this->serviceVariationId)) { $json['service_variation_id'] = $this->serviceVariationId; } $json['team_member_id'] = $this->teamMemberId; if (isset($this->serviceVariationVersion)) { $json['service_variation_version'] = $this->serviceVariationVersion; } if (isset($this->intermissionMinutes)) { $json['intermission_minutes'] = $this->intermissionMinutes; } if (isset($this->anyTeamMember)) { $json['any_team_member'] = $this->anyTeamMember; } if (isset($this->resourceIds)) { $json['resource_ids'] = $this->resourceIds; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 