<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class SegmentFilter implements \JsonSerializable { private $serviceVariationId; private $teamMemberIdFilter; public function __construct(string $serviceVariationId) { $this->serviceVariationId = $serviceVariationId; } public function getServiceVariationId(): string { return $this->serviceVariationId; } public function setServiceVariationId(string $serviceVariationId): void { $this->serviceVariationId = $serviceVariationId; } public function getTeamMemberIdFilter(): ?FilterValue { return $this->teamMemberIdFilter; } public function setTeamMemberIdFilter(?FilterValue $teamMemberIdFilter): void { $this->teamMemberIdFilter = $teamMemberIdFilter; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['service_variation_id'] = $this->serviceVariationId; if (isset($this->teamMemberIdFilter)) { $json['team_member_id_filter'] = $this->teamMemberIdFilter; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 