$metadata */ public function __construct( public OperationRunActionabilityStatus $status, public string $reasonCode, public string $explanation, public ?int $supersedingRunId = null, public ?string $resolvingModelType = null, public ?int $resolvingModelId = null, public string $policyIdentifier = 'default', public array $metadata = [], public ?int $runId = null, public ?string $operationType = null, public ?string $canonicalType = null, ) {} public function withRun(OperationRun $run): self { return new self( status: $this->status, reasonCode: $this->reasonCode, explanation: $this->explanation, supersedingRunId: $this->supersedingRunId, resolvingModelType: $this->resolvingModelType, resolvingModelId: $this->resolvingModelId, policyIdentifier: $this->policyIdentifier, metadata: $this->metadata, runId: (int) $run->getKey(), operationType: (string) $run->type, canonicalType: $run->canonicalOperationType(), ); } public function requiresCurrentFollowUp(): bool { return $this->status->requiresCurrentFollowUp(); } public function isActionable(): bool { return $this->requiresCurrentFollowUp(); } /** * @return array */ public function toArray(): array { return [ 'status' => $this->status->value, 'status_label' => $this->status->label(), 'actionable' => $this->requiresCurrentFollowUp(), 'reason_code' => $this->reasonCode, 'explanation' => $this->explanation, 'superseding_run_id' => $this->supersedingRunId, 'resolving_model_type' => $this->resolvingModelType, 'resolving_model_id' => $this->resolvingModelId, 'policy_identifier' => $this->policyIdentifier, 'metadata' => $this->metadata, 'run_id' => $this->runId, 'operation_type' => $this->operationType, 'canonical_type' => $this->canonicalType, ]; } }