"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.SSHKeyDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const cloud_provider_enum_1 = require("../../providers/enums/cloud-provider.enum");
class SSHKeyDto {
}
exports.SSHKeyDto = SSHKeyDto;
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'SSH key unique identifier' }),
    __metadata("design:type", String)
], SSHKeyDto.prototype, "id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'SSH key name/label' }),
    __metadata("design:type", String)
], SSHKeyDto.prototype, "name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'SSH public key content' }),
    __metadata("design:type", String)
], SSHKeyDto.prototype, "publicKey", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'SSH key fingerprint' }),
    __metadata("design:type", String)
], SSHKeyDto.prototype, "fingerprint", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'SSH key type (rsa, ed25519, etc.)' }),
    __metadata("design:type", String)
], SSHKeyDto.prototype, "type", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Key creation date' }),
    __metadata("design:type", Date)
], SSHKeyDto.prototype, "createdAt", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'Key last update date' }),
    __metadata("design:type", Date)
], SSHKeyDto.prototype, "updatedAt", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Key source',
        enum: ['local', ...Object.values(cloud_provider_enum_1.CloudProvider)],
        example: 'local',
    }),
    __metadata("design:type", String)
], SSHKeyDto.prototype, "source", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Whether this key was synced from a provider',
        default: false,
    }),
    __metadata("design:type", Boolean)
], SSHKeyDto.prototype, "syncedFromProvider", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Provider where this key is also available',
        enum: cloud_provider_enum_1.CloudProvider,
    }),
    __metadata("design:type", String)
], SSHKeyDto.prototype, "availableOnProvider", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Provider-specific key ID (if synced)',
    }),
    __metadata("design:type", String)
], SSHKeyDto.prototype, "providerKeyId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether the SSH key is currently active',
        default: true,
    }),
    __metadata("design:type", Boolean)
], SSHKeyDto.prototype, "isActive", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether this SSH key was automatically generated by the system',
        default: false,
    }),
    __metadata("design:type", Boolean)
], SSHKeyDto.prototype, "autoGenerated", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Last time this key was used (if available)',
    }),
    __metadata("design:type", Date)
], SSHKeyDto.prototype, "lastUsed", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Key-value pairs for tagging. Values can be strings or arrays',
        example: {
            'cluster-id': ['k3s-prod-eu-001', 'k3s-prod-eu-002'],
            'cluster-node-id': 'node-worker-02',
            roles: ['master', 'worker'],
        },
        required: false,
    }),
    __metadata("design:type", Object)
], SSHKeyDto.prototype, "tags", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Mapping of cloud provider to provider-specific SSH key IDs',
        example: {
            HETZNER: '12345',
            CONTABO: 'abc-def',
        },
        required: false,
    }),
    __metadata("design:type", Object)
], SSHKeyDto.prototype, "providerKeyMappings", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Provider sync errors, present only when one or more providers failed to sync. ' +
            'The key was created locally and synced successfully to providers NOT listed here.',
        example: { SCALEWAY: 'Request failed with status code 409' },
    }),
    __metadata("design:type", Object)
], SSHKeyDto.prototype, "syncErrors", void 0);
