get('params'); if (!is_string($raw)) { throw new RuntimeException("No 'params'."); } /** @var Params $params */ $params = unserialize(base64_decode($raw)); return $params; } public function getStatus(): string { $value = $this->get('status'); if (!is_string($value)) { throw new RuntimeException("No 'status'."); } return $value; } public function getAttachmentId(): ?string { /** @var ?string */ return $this->get('attachmentId'); } public function notifyOnFinish(): bool { return (bool) $this->get('notifyOnFinish'); } public function getCreatedAt(): DateTime { $value = $this->getValueObject('createdAt'); if (!$value instanceof DateTime) { throw new RuntimeException("No 'createdAt'."); } return $value; } public function getCreatedBy(): Link { $value = $this->getValueObject('createdBy'); if (!$value instanceof Link) { throw new RuntimeException("No 'createdBy'."); } return $value; } public function setStatus(string $status): self { $this->set('status', $status); return $this; } public function setAttachmentId(string $attachmentId): self { $this->set('attachmentId', $attachmentId); return $this; } public function setNotifyOnFinish(bool $notifyOnFinish = true): self { $this->set('notifyOnFinish', $notifyOnFinish); return $this; } }