Automated PR: merge branch 248-private-ai-policy-foundation into dev (created by Copilot) Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #288
37 lines
919 B
PHP
37 lines
919 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\Ai;
|
|
|
|
use App\Support\Audit\AuditActionId;
|
|
|
|
final readonly class AiExecutionDecision
|
|
{
|
|
/**
|
|
* @param list<string> $dataClassifications
|
|
* @param array<string, mixed> $auditMetadata
|
|
*/
|
|
public function __construct(
|
|
public string $outcome,
|
|
public AiDecisionReasonCode $reasonCode,
|
|
public string $workspaceAiPolicyMode,
|
|
public ?string $matchedOperationalControlScope,
|
|
public string $useCaseKey,
|
|
public string $requestedProviderClass,
|
|
public array $dataClassifications,
|
|
public string $sourceFamily,
|
|
public AuditActionId $auditAction,
|
|
public array $auditMetadata,
|
|
) {}
|
|
|
|
public function isAllowed(): bool
|
|
{
|
|
return $this->outcome === 'allowed';
|
|
}
|
|
|
|
public function isBlocked(): bool
|
|
{
|
|
return $this->outcome === 'blocked';
|
|
}
|
|
} |