*/ private array $job; /** * Cross-request correlation identifier extracted from the * record's payload, or null when absent. */ private ?string $correlationId; /** * Originating-request identifier extracted from the record's * payload, or null when absent. */ private ?string $parentRequestId; /** * Construct the result with explicit values for every axis. * * @param array $job Wire-projected §6.5 `SyncJob`. * @param string|null $correlationId Correlation series id. * @param string|null $parentRequestId Originating request id. */ public function __construct( array $job, ?string $correlationId, ?string $parentRequestId ) { $this->job = $job; $this->correlationId = $correlationId; $this->parentRequestId = $parentRequestId; } /** * Wire-projected §6.5 `SyncJob` shape. * * @return array */ public function job(): array { return $this->job; } /** * Cross-request correlation identifier, or null when absent. */ public function correlationId(): ?string { return $this->correlationId; } /** * Originating-request identifier, or null when absent. */ public function parentRequestId(): ?string { return $this->parentRequestId; } /** * Render the §11.4 success envelope `data` shape: the * wire-projected job map merged with two top-level correlation * axes (`correlation_id`, `parent_request_id`). Both correlation * axes are always present on the output map, taking the null * value when absent on the originating record. * * @return array */ public function toArray(): array { $out = $this->job; $out['correlation_id'] = $this->correlationId; $out['parent_request_id'] = $this->parentRequestId; return $out; } }