"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.BuildResourcesResponseDto = exports.ResourceAmountDto = void 0;
const swagger_1 = require("@nestjs/swagger");
class ResourceAmountDto {
}
exports.ResourceAmountDto = ResourceAmountDto;
__decorate([
    (0, swagger_1.ApiProperty)({ example: '800m' }),
    __metadata("design:type", String)
], ResourceAmountDto.prototype, "cpu", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: '896Mi' }),
    __metadata("design:type", String)
], ResourceAmountDto.prototype, "memory", void 0);
class BuildResourcesResponseDto {
}
exports.BuildResourcesResponseDto = BuildResourcesResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        enum: ['ok', 'autoscaling_required', 'insufficient'],
        example: 'ok',
    }),
    __metadata("design:type", String)
], BuildResourcesResponseDto.prototype, "status", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        type: ResourceAmountDto,
        description: 'Fixed resources required by the build job',
    }),
    __metadata("design:type", ResourceAmountDto)
], BuildResourcesResponseDto.prototype, "required", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        type: ResourceAmountDto,
        description: 'Resources currently available (after 10% safety margin)',
    }),
    __metadata("design:type", ResourceAmountDto)
], BuildResourcesResponseDto.prototype, "available", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        type: ResourceAmountDto,
        description: 'Total allocatable resources across all ready nodes',
    }),
    __metadata("design:type", ResourceAmountDto)
], BuildResourcesResponseDto.prototype, "total", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        type: ResourceAmountDto,
        description: 'Resources already requested by running pods',
    }),
    __metadata("design:type", ResourceAmountDto)
], BuildResourcesResponseDto.prototype, "used", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        example: false,
        description: 'Whether the cluster has autoscaling enabled',
    }),
    __metadata("design:type", Boolean)
], BuildResourcesResponseDto.prototype, "autoscalingEnabled", void 0);
