"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.ProviderFirewallResponseDto = exports.AppliedServerDto = exports.FirewallRuleResponseDto = void 0;
const swagger_1 = require("@nestjs/swagger");
/**
 * Firewall rule as returned by the provider
 */
class FirewallRuleResponseDto {
}
exports.FirewallRuleResponseDto = FirewallRuleResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Rule description',
        example: 'SSH access',
    }),
    __metadata("design:type", String)
], FirewallRuleResponseDto.prototype, "description", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Traffic direction',
        enum: ['in', 'out'],
        example: 'in',
    }),
    __metadata("design:type", String)
], FirewallRuleResponseDto.prototype, "direction", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Network protocol',
        enum: ['tcp', 'udp', 'icmp'],
        example: 'tcp',
    }),
    __metadata("design:type", String)
], FirewallRuleResponseDto.prototype, "protocol", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Port or port range (optional for ICMP)',
        example: '22',
        required: false,
    }),
    __metadata("design:type", String)
], FirewallRuleResponseDto.prototype, "port", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Source IP CIDRs (for inbound rules)',
        type: [String],
        example: ['0.0.0.0/0', '::/0'],
        required: false,
    }),
    __metadata("design:type", Array)
], FirewallRuleResponseDto.prototype, "sourceIps", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Destination IP CIDRs (for outbound rules)',
        type: [String],
        example: ['0.0.0.0/0', '::/0'],
        required: false,
    }),
    __metadata("design:type", Array)
], FirewallRuleResponseDto.prototype, "destinationIps", void 0);
/**
 * Server to which a firewall is applied
 */
class AppliedServerDto {
}
exports.AppliedServerDto = AppliedServerDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Provider server ID',
        example: '12345678',
    }),
    __metadata("design:type", String)
], AppliedServerDto.prototype, "serverId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Server name (if available)',
        example: 'my-cluster-node-1',
        required: false,
    }),
    __metadata("design:type", String)
], AppliedServerDto.prototype, "serverName", void 0);
/**
 * Firewall details as returned by the cloud provider
 */
class ProviderFirewallResponseDto {
}
exports.ProviderFirewallResponseDto = ProviderFirewallResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Provider firewall ID',
        example: '12345678',
    }),
    __metadata("design:type", String)
], ProviderFirewallResponseDto.prototype, "id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Firewall name',
        example: 'flui-my-cluster-system-webapp',
    }),
    __metadata("design:type", String)
], ProviderFirewallResponseDto.prototype, "name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Firewall rules',
        type: [FirewallRuleResponseDto],
    }),
    __metadata("design:type", Array)
], ProviderFirewallResponseDto.prototype, "rules", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Firewall labels/tags',
        example: {
            'managed-by': 'flui-cloud',
            'flui-cluster-id': 'abc-123-def',
            'flui-resource-type': 'firewall',
        },
    }),
    __metadata("design:type", Object)
], ProviderFirewallResponseDto.prototype, "labels", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Servers to which this firewall is applied',
        type: [AppliedServerDto],
    }),
    __metadata("design:type", Array)
], ProviderFirewallResponseDto.prototype, "appliedServers", void 0);
