$counts * @param array> $permissionRows * @param array $freshness * @param array|null $recommendedAction * @param array> $childResults * @param array $technical */ public function __construct( public string $provider, public ?int $workspaceId, public ?int $managedEnvironmentId, public ?int $providerConnectionId, public ProviderReadinessState $state, public array $counts, public array $permissionRows, public array $freshness, public bool $canManageProvider, public bool $canViewTechnicalDetail, public ?array $recommendedAction = null, public array $childResults = [], public array $technical = [], ) {} /** * @return array */ public function toArray(): array { return [ 'provider' => $this->provider, 'workspace_id' => $this->workspaceId, 'managed_environment_id' => $this->managedEnvironmentId, 'provider_connection_id' => $this->providerConnectionId, 'state' => $this->state->value, 'state_label' => $this->state->label(), 'counts' => $this->counts, 'permission_rows' => $this->permissionRows, 'freshness' => $this->freshness, 'can_manage_provider' => $this->canManageProvider, 'can_view_technical_detail' => $this->canViewTechnicalDetail, 'recommended_action' => $this->recommendedAction, 'child_results' => $this->childResults, 'technical' => $this->canViewTechnicalDetail ? $this->technical : [], ]; } }