"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.ClusterResponseDto = exports.ClusterNodeDto = exports.VNetAttachmentInfoDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const cluster_entity_1 = require("../entities/cluster.entity");
class VNetAttachmentInfoDto {
}
exports.VNetAttachmentInfoDto = VNetAttachmentInfoDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'VNet UUID',
        example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
    }),
    __metadata("design:type", String)
], VNetAttachmentInfoDto.prototype, "vnetId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Subnet UUID',
        example: 'b2c3d4e5-f6a7-8901-bcde-f12345678901',
    }),
    __metadata("design:type", String)
], VNetAttachmentInfoDto.prototype, "subnetId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Private IP address assigned in VNet',
        example: '10.0.1.5',
    }),
    __metadata("design:type", String)
], VNetAttachmentInfoDto.prototype, "privateIp", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Timestamp when the node was attached to VNet',
        example: '2024-01-15T10:30:00Z',
    }),
    __metadata("design:type", String)
], VNetAttachmentInfoDto.prototype, "attachedAt", void 0);
class ClusterNodeDto {
}
exports.ClusterNodeDto = ClusterNodeDto;
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Node ID' }),
    __metadata("design:type", String)
], ClusterNodeDto.prototype, "id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Server name' }),
    __metadata("design:type", String)
], ClusterNodeDto.prototype, "serverName", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Node type',
        enum: ['master', 'worker'],
        example: 'worker',
    }),
    __metadata("design:type", String)
], ClusterNodeDto.prototype, "nodeType", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Node IP address', example: '10.0.1.10' }),
    __metadata("design:type", String)
], ClusterNodeDto.prototype, "ipAddress", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Node status',
        enum: ['creating', 'joining', 'ready', 'error', 'deleting'],
        example: 'ready',
    }),
    __metadata("design:type", String)
], ClusterNodeDto.prototype, "status", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'VNet attachment information',
        type: VNetAttachmentInfoDto,
    }),
    __metadata("design:type", VNetAttachmentInfoDto)
], ClusterNodeDto.prototype, "vnetInfo", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Real-time server status from cloud provider (only included when include_real_status=true)',
        example: 'running',
        enum: ['running', 'off', 'starting', 'stopping', 'unknown'],
    }),
    __metadata("design:type", String)
], ClusterNodeDto.prototype, "provider_status", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Whether node status is synced with provider state (only included when include_real_status=true)',
        example: true,
    }),
    __metadata("design:type", Boolean)
], ClusterNodeDto.prototype, "is_synced", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Node creation timestamp' }),
    __metadata("design:type", Date)
], ClusterNodeDto.prototype, "createdAt", void 0);
class ClusterResponseDto {
}
exports.ClusterResponseDto = ClusterResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Cluster ID' }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Cluster name', example: 'production-cluster' }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cloud provider',
        example: 'hetzner',
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "provider", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Region', example: 'fsn1' }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "region", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Node size', example: 'cx22' }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "nodeSize", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Current number of nodes', example: 3 }),
    __metadata("design:type", Number)
], ClusterResponseDto.prototype, "nodeCount", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster status',
        enum: ['creating', 'ready', 'scaling', 'error', 'deleting', 'deleted'],
        example: 'ready',
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "status", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Type of cluster (observability or workload)',
        enum: cluster_entity_1.ClusterType,
        example: cluster_entity_1.ClusterType.WORKLOAD,
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "clusterType", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Autoscaling enabled', example: false }),
    __metadata("design:type", Boolean)
], ClusterResponseDto.prototype, "autoscalingEnabled", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Minimum nodes (autoscaling)',
        example: 2,
    }),
    __metadata("design:type", Number)
], ClusterResponseDto.prototype, "minNodes", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Maximum nodes (autoscaling)',
        example: 5,
    }),
    __metadata("design:type", Number)
], ClusterResponseDto.prototype, "maxNodes", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'K3s version',
        example: 'v1.35.4+k3s1',
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "k3sVersion", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Master node IP address',
        example: '10.0.1.10',
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "masterIpAddress", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'VNet UUID if cluster is attached to a VNet',
        example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "vnetId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'VNet name if cluster is attached to a VNet',
        example: 'production-vnet',
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "vnetName", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Grafana Prometheus datasource UID (if cluster is registered to observability)',
        example: 'dfb2lmgjxfaioe',
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "grafanaPrometheusUid", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Grafana Loki datasource UID (if cluster is registered to observability)',
        example: 'aek3nqjxfbcpqf',
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "grafanaLokiUid", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cluster nodes',
        type: [ClusterNodeDto],
    }),
    __metadata("design:type", Array)
], ClusterResponseDto.prototype, "nodes", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Real-time cluster status based on all node states (only included when include_real_status=true)',
        example: 'all_running',
        enum: ['all_running', 'all_stopped', 'mixed', 'unknown'],
    }),
    __metadata("design:type", String)
], ClusterResponseDto.prototype, "cluster_real_status", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Whether cluster status is synced with all nodes real state (only included when include_real_status=true)',
        example: true,
    }),
    __metadata("design:type", Boolean)
], ClusterResponseDto.prototype, "is_synced", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Cluster creation timestamp' }),
    __metadata("design:type", Date)
], ClusterResponseDto.prototype, "createdAt", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Last update timestamp' }),
    __metadata("design:type", Date)
], ClusterResponseDto.prototype, "updatedAt", void 0);
