TenantAtlas/apps/platform/app/Services/TenantConfiguration/ExchangePowerShellInvocationContext.php
2026-07-07 15:54:34 +02:00

41 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Services\TenantConfiguration;
final readonly class ExchangePowerShellInvocationContext
{
public function __construct(
public int $operationRunId,
public int $workspaceId,
public int $managedEnvironmentId,
public int $providerConnectionId,
public string $canonicalType,
public string $commandName,
public string $runnerMode,
public string $redactionPolicy,
public string $sourceContractState,
public ?string $credentialSource = null,
) {}
/**
* @return array<string, mixed>
*/
public function toArray(): array
{
return array_filter([
'operation_run_id' => $this->operationRunId,
'workspace_id' => $this->workspaceId,
'managed_environment_id' => $this->managedEnvironmentId,
'provider_connection_id' => $this->providerConnectionId,
'canonical_type' => $this->canonicalType,
'command_name' => $this->commandName,
'runner_mode' => $this->runnerMode,
'redaction_policy' => $this->redactionPolicy,
'source_contract_state' => $this->sourceContractState,
'credential_source' => $this->credentialSource,
], static fn (mixed $value): bool => $value !== null && $value !== '');
}
}