import { Repository } from 'typeorm';
import { Queue } from 'bull';
import { ClusterEntity } from '../entities/cluster.entity';
import { ClusterStopResponseDto, ClusterStartResponseDto, ClusterPowerOperationResponseDto, ReconcileStatusResponseDto } from '../dto/cluster-power-management.dto';
import { ClusterResponseDto } from '../dto/cluster-response.dto';
import { ProviderFactory } from '../../../../modules/providers/services/provider.factory';
import { InfrastructureOperationEntity } from '../../servers/entities/infrastructure-operations.entity';
/**
 * Service for managing cluster power state (stop/start servers)
 * and reconciling cluster status with real provider state
 */
export declare class ClusterPowerManagementService {
    private readonly clusterRepository;
    private readonly operationRepository;
    private readonly infrastructureQueue;
    private readonly providerFactory;
    private readonly logger;
    constructor(clusterRepository: Repository<ClusterEntity>, operationRepository: Repository<InfrastructureOperationEntity>, infrastructureQueue: Queue, providerFactory: ProviderFactory);
    /**
     * Stop all servers in a cluster (async - queued operation)
     */
    stopClusterAsync(clusterId: string): Promise<ClusterPowerOperationResponseDto>;
    /**
     * Start all servers in a cluster (async - queued operation)
     */
    startClusterAsync(clusterId: string): Promise<ClusterPowerOperationResponseDto>;
    /**
     * Execute stop cluster operation (called by processor)
     * @deprecated Use stopCluster for sync operations
     */
    stopCluster(clusterId: string): Promise<ClusterStopResponseDto>;
    /**
     * Start all servers in a cluster
     */
    startCluster(clusterId: string): Promise<ClusterStartResponseDto>;
    /**
     * Reconcile cluster status with real provider state
     */
    reconcileClusterStatus(clusterId: string, autoFix?: boolean): Promise<ReconcileStatusResponseDto>;
    private loadClusterWithNodes;
    private countNodeStates;
    private computeReconciliation;
    private autoFixMixedState;
    /**
     * Enrich cluster DTO with real-time status from provider
     */
    enrichClusterWithRealStatus(cluster: ClusterEntity): Promise<ClusterResponseDto>;
    /**
     * Execute stop cluster operation - called by queue processor
     */
    executeStopCluster(clusterId: string, operationId: string): Promise<void>;
    /**
     * Execute start cluster operation - called by queue processor
     */
    executeStartCluster(clusterId: string, operationId: string): Promise<void>;
    /**
     * Update operation step helper
     */
    private updateOperationStep;
    /**
     * Get provider and verify it supports power management
     */
    private getProviderWithPowerManagement;
    /**
     * Calculate monthly savings when cluster is stopped
     */
    private calculateSavings;
}
