"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.ResourceAvailabilityResponseDto = exports.ResourceAmountStringDto = void 0;
const swagger_1 = require("@nestjs/swagger");
class ResourceAmountStringDto {
}
exports.ResourceAmountStringDto = ResourceAmountStringDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        example: '250m',
        description: 'CPU in millicores (e.g. "250m", "1000m")',
    }),
    __metadata("design:type", String)
], ResourceAmountStringDto.prototype, "cpu", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        example: '256Mi',
        description: 'Memory in Mi (e.g. "256Mi", "1Gi")',
    }),
    __metadata("design:type", String)
], ResourceAmountStringDto.prototype, "memory", void 0);
class ResourceAvailabilityResponseDto {
}
exports.ResourceAvailabilityResponseDto = ResourceAvailabilityResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        example: true,
        description: 'Whether the cluster can accommodate the requested resources',
    }),
    __metadata("design:type", Boolean)
], ResourceAvailabilityResponseDto.prototype, "canDeploy", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        example: 'insufficient_resources',
        enum: ['insufficient_resources', 'autoscaling_pending'],
        nullable: true,
        description: 'Machine-readable reason when resources are not freely available. ' +
            'null = ok; "insufficient_resources" = not enough capacity, autoscaling OFF; ' +
            '"autoscaling_pending" = not enough capacity now but autoscaling will handle it.',
    }),
    __metadata("design:type", String)
], ResourceAvailabilityResponseDto.prototype, "reason", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        example: 'medium',
        description: 'The profile that was checked (null for custom resource requests)',
        nullable: true,
    }),
    __metadata("design:type", String)
], ResourceAvailabilityResponseDto.prototype, "profile", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        type: ResourceAmountStringDto,
        description: 'Resources required by the request',
    }),
    __metadata("design:type", ResourceAmountStringDto)
], ResourceAvailabilityResponseDto.prototype, "required", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        type: ResourceAmountStringDto,
        description: 'Resources available after 10% margin',
    }),
    __metadata("design:type", ResourceAmountStringDto)
], ResourceAvailabilityResponseDto.prototype, "available", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        type: ResourceAmountStringDto,
        description: 'Total allocatable resources in the cluster',
    }),
    __metadata("design:type", ResourceAmountStringDto)
], ResourceAvailabilityResponseDto.prototype, "total", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        type: ResourceAmountStringDto,
        description: 'Resources currently in use by running pods',
    }),
    __metadata("design:type", ResourceAmountStringDto)
], ResourceAvailabilityResponseDto.prototype, "used", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: false }),
    __metadata("design:type", Boolean)
], ResourceAvailabilityResponseDto.prototype, "autoscalingEnabled", void 0);
