"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReconcileStatusResponseDto = exports.ReconcileStatusDto = exports.ClusterStartResponseDto = exports.ClusterStopResponseDto = exports.ClusterPowerOperationResponseDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const cluster_entity_1 = require("../entities/cluster.entity");
const class_validator_1 = require("class-validator");
/**
 * Response DTO for cluster stop/start operation (async)
 */
class ClusterPowerOperationResponseDto {
}
exports.ClusterPowerOperationResponseDto = ClusterPowerOperationResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Operation ID for tracking',
        example: 'op-123e4567-e89b-12d3-a456-426614174000',
    }),
    __metadata("design:type", String)
], ClusterPowerOperationResponseDto.prototype, "operation_id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster ID',
        example: '123e4567-e89b-12d3-a456-426614174000',
    }),
    __metadata("design:type", String)
], ClusterPowerOperationResponseDto.prototype, "cluster_id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Operation status',
        example: 'pending',
        enum: ['pending'],
    }),
    __metadata("design:type", String)
], ClusterPowerOperationResponseDto.prototype, "status", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Estimated duration for completion',
        example: '2-5 minutes',
    }),
    __metadata("design:type", String)
], ClusterPowerOperationResponseDto.prototype, "estimated_duration", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Operation creation timestamp',
    }),
    __metadata("design:type", Date)
], ClusterPowerOperationResponseDto.prototype, "created_at", void 0);
/**
 * @deprecated Use ClusterPowerOperationResponseDto for async operations
 * Response DTO for cluster stop operation (legacy sync)
 */
class ClusterStopResponseDto {
}
exports.ClusterStopResponseDto = ClusterStopResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster ID',
        example: '123e4567-e89b-12d3-a456-426614174000',
    }),
    __metadata("design:type", String)
], ClusterStopResponseDto.prototype, "cluster_id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster name',
        example: 'my-workload-cluster',
    }),
    __metadata("design:type", String)
], ClusterStopResponseDto.prototype, "cluster_name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster status after operation',
        enum: cluster_entity_1.ClusterStatus,
        example: cluster_entity_1.ClusterStatus.STOPPED,
    }),
    __metadata("design:type", String)
], ClusterStopResponseDto.prototype, "status", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Number of servers that were stopped',
        example: 3,
    }),
    __metadata("design:type", Number)
], ClusterStopResponseDto.prototype, "servers_stopped", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Total number of servers in cluster',
        example: 3,
    }),
    __metadata("design:type", Number)
], ClusterStopResponseDto.prototype, "total_servers", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Estimated monthly cost savings',
        example: '~20.70€',
    }),
    __metadata("design:type", String)
], ClusterStopResponseDto.prototype, "monthly_savings_estimate", void 0);
/**
 * Response DTO for cluster start operation
 */
class ClusterStartResponseDto {
}
exports.ClusterStartResponseDto = ClusterStartResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster ID',
        example: '123e4567-e89b-12d3-a456-426614174000',
    }),
    __metadata("design:type", String)
], ClusterStartResponseDto.prototype, "cluster_id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster name',
        example: 'my-workload-cluster',
    }),
    __metadata("design:type", String)
], ClusterStartResponseDto.prototype, "cluster_name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster status after operation',
        enum: cluster_entity_1.ClusterStatus,
        example: cluster_entity_1.ClusterStatus.READY,
    }),
    __metadata("design:type", String)
], ClusterStartResponseDto.prototype, "status", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Number of servers that were started',
        example: 3,
    }),
    __metadata("design:type", Number)
], ClusterStartResponseDto.prototype, "servers_started", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Total number of servers in cluster',
        example: 3,
    }),
    __metadata("design:type", Number)
], ClusterStartResponseDto.prototype, "total_servers", void 0);
/**
 * Request DTO for reconcile status operation
 */
class ReconcileStatusDto {
}
exports.ReconcileStatusDto = ReconcileStatusDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Auto-fix inconsistencies by starting/stopping servers to match desired state',
        example: false,
        required: false,
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsBoolean)(),
    __metadata("design:type", Boolean)
], ReconcileStatusDto.prototype, "autoFix", void 0);
/**
 * Response DTO for reconcile status operation
 */
class ReconcileStatusResponseDto {
}
exports.ReconcileStatusResponseDto = ReconcileStatusResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster ID',
        example: '123e4567-e89b-12d3-a456-426614174000',
    }),
    __metadata("design:type", String)
], ReconcileStatusResponseDto.prototype, "cluster_id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster name',
        example: 'my-workload-cluster',
    }),
    __metadata("design:type", String)
], ReconcileStatusResponseDto.prototype, "cluster_name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster status before reconciliation',
        enum: cluster_entity_1.ClusterStatus,
        example: cluster_entity_1.ClusterStatus.READY,
    }),
    __metadata("design:type", String)
], ReconcileStatusResponseDto.prototype, "previous_status", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster status after reconciliation',
        enum: cluster_entity_1.ClusterStatus,
        example: cluster_entity_1.ClusterStatus.STOPPED,
    }),
    __metadata("design:type", String)
], ReconcileStatusResponseDto.prototype, "new_status", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether cluster status is now synced with real provider state',
        example: true,
    }),
    __metadata("design:type", Boolean)
], ReconcileStatusResponseDto.prototype, "is_synced", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Number of nodes that were reconciled',
        example: 3,
    }),
    __metadata("design:type", Number)
], ReconcileStatusResponseDto.prototype, "nodes_reconciled", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'List of actions taken during reconciliation',
        example: ['Updated cluster status from READY to STOPPED'],
        type: [String],
    }),
    __metadata("design:type", Array)
], ReconcileStatusResponseDto.prototype, "actions_taken", void 0);
