"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.UpdateSSHKeyDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const class_validator_1 = require("class-validator");
const cloud_provider_enum_1 = require("../../providers/enums/cloud-provider.enum");
class UpdateSSHKeyDto {
}
exports.UpdateSSHKeyDto = UpdateSSHKeyDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Key-value pairs for tagging. Values can be strings or arrays. This will replace all existing tags',
        example: {
            'cluster-id': ['k3s-prod-eu-001', 'k3s-prod-eu-002'],
            'cluster-node-id': 'node-worker-03',
            roles: ['master', 'worker'],
        },
        required: false,
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsObject)(),
    __metadata("design:type", Object)
], UpdateSSHKeyDto.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,
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsObject)(),
    __metadata("design:type", Object)
], UpdateSSHKeyDto.prototype, "providerKeyMappings", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'List of cloud providers to sync this SSH key to. ' +
            'Triggers actual key creation on each specified provider and updates providerKeyMappings. ' +
            'Use this to push an existing key to providers it was not originally synced to.',
        enum: cloud_provider_enum_1.CloudProvider,
        isArray: true,
        example: [cloud_provider_enum_1.CloudProvider.SCALEWAY],
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsArray)(),
    (0, class_validator_1.IsEnum)(cloud_provider_enum_1.CloudProvider, { each: true }),
    __metadata("design:type", Array)
], UpdateSSHKeyDto.prototype, "syncProviders", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'List of cloud providers to remove this SSH key from. ' +
            'Deletes the key on each specified provider and clears the mapping from providerKeyMappings. ' +
            'The key is NOT deleted from the local database.',
        enum: cloud_provider_enum_1.CloudProvider,
        isArray: true,
        example: [cloud_provider_enum_1.CloudProvider.SCALEWAY],
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsArray)(),
    (0, class_validator_1.IsEnum)(cloud_provider_enum_1.CloudProvider, { each: true }),
    __metadata("design:type", Array)
], UpdateSSHKeyDto.prototype, "unsyncProviders", void 0);
