3 ) { throw new \InvalidArgumentException( 'Invalid node status or severity.' ); } // Detectors must supply only allowlisted, non-secret operational metadata. $this->data = compact( 'id', 'type', 'category', 'label', 'status', 'severity', 'metadata' ); } public function getId(): string { return $this->data['id']; } public function jsonSerialize(): array { $data = $this->data; $data['metadata'] = (object) $data['metadata']; return $data; } }