"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.TestRouterDto = exports.UpdateRouterDto = exports.AddRouterDto = void 0;
const class_validator_1 = require("class-validator");
const swagger_1 = require("@nestjs/swagger");
const state_machines_1 = require("../../common/constants/state-machines");
class AddRouterDto {
    constructor() {
        this.apiPort = 8728;
        this.useSsl = false;
    }
}
exports.AddRouterDto = AddRouterDto;
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Router name', example: 'Main Office Router' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)(),
    __metadata("design:type", String)
], AddRouterDto.prototype, "name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Router platform type',
        enum: state_machines_1.ROUTER_PLATFORMS,
        example: state_machines_1.ROUTER_PLATFORMS.MIKROTIK,
    }),
    (0, class_validator_1.IsEnum)(state_machines_1.ROUTER_PLATFORMS),
    __metadata("design:type", String)
], AddRouterDto.prototype, "platform", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Router hostname or IP address', example: '192.168.88.1' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)(),
    __metadata("design:type", String)
], AddRouterDto.prototype, "host", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'API port',
        default: 8728,
        example: 8728,
    }),
    (0, class_validator_1.IsNumber)(),
    (0, class_validator_1.Min)(1),
    (0, class_validator_1.Max)(65535),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", Number)
], AddRouterDto.prototype, "apiPort", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'API username', example: 'admin' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)(),
    __metadata("design:type", String)
], AddRouterDto.prototype, "apiUsername", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'API password' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)(),
    __metadata("design:type", String)
], AddRouterDto.prototype, "apiPassword", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Location ID to associate with this router',
    }),
    (0, class_validator_1.IsUUID)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", String)
], AddRouterDto.prototype, "locationId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Use SSL for API connection',
        default: false,
    }),
    (0, class_validator_1.IsBoolean)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", Boolean)
], AddRouterDto.prototype, "useSsl", void 0);
class UpdateRouterDto {
}
exports.UpdateRouterDto = UpdateRouterDto;
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'Router name' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", String)
], UpdateRouterDto.prototype, "name", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Router platform type',
        enum: state_machines_1.ROUTER_PLATFORMS,
    }),
    (0, class_validator_1.IsEnum)(state_machines_1.ROUTER_PLATFORMS),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", String)
], UpdateRouterDto.prototype, "platform", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'Router hostname or IP address' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", String)
], UpdateRouterDto.prototype, "host", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'API port', minimum: 1, maximum: 65535 }),
    (0, class_validator_1.IsNumber)(),
    (0, class_validator_1.Min)(1),
    (0, class_validator_1.Max)(65535),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", Number)
], UpdateRouterDto.prototype, "apiPort", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'API username' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", String)
], UpdateRouterDto.prototype, "apiUsername", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'API password' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", String)
], UpdateRouterDto.prototype, "apiPassword", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'Location ID' }),
    (0, class_validator_1.IsUUID)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", String)
], UpdateRouterDto.prototype, "locationId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'Use SSL' }),
    (0, class_validator_1.IsBoolean)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", Boolean)
], UpdateRouterDto.prototype, "useSsl", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ description: 'Whether the router is active' }),
    (0, class_validator_1.IsBoolean)(),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", Boolean)
], UpdateRouterDto.prototype, "isActive", void 0);
class TestRouterDto {
}
exports.TestRouterDto = TestRouterDto;
__decorate([
    (0, swagger_1.ApiProperty)({ description: 'Router ID to test connection' }),
    (0, class_validator_1.IsUUID)(),
    (0, class_validator_1.IsNotEmpty)(),
    __metadata("design:type", String)
], TestRouterDto.prototype, "routerId", void 0);
