type = $type; $this->id = $id; $this->label = $label; } public function getType(): string { return $this->type; } public function getId(): string { return $this->id; } public function withSourceId(string $sourceId): self { $this->sourceId = $sourceId; return $this; } public function getSourceId(): string { return $this->sourceId; } public function getLabel(): ?string { return $this->label; } public function jsonSerialize(): array { return [ 'type' => $this->type, 'id' => $this->id, 'label' => $this->label ?? '', ]; } }