"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.ApiTokenDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const credentials_entity_1 = require("../../management/entities/credentials.entity");
class ApiTokenDto {
}
exports.ApiTokenDto = ApiTokenDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Unique token ID',
        example: '6f103ec7-8b23-4c97-b0e8-9d9e5dba8382',
    }),
    __metadata("design:type", String)
], ApiTokenDto.prototype, "id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Cloud provider',
        example: 'hetzner',
    }),
    __metadata("design:type", String)
], ApiTokenDto.prototype, "provider", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Credential type',
        enum: credentials_entity_1.CredentialType,
        example: credentials_entity_1.CredentialType.API_KEY,
    }),
    __metadata("design:type", String)
], ApiTokenDto.prototype, "credential_type", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Label for this credential',
        example: 'Production Hetzner Account',
    }),
    __metadata("design:type", String)
], ApiTokenDto.prototype, "label", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Notes about this credential',
        example: 'Used for infrastructure in EU region',
    }),
    __metadata("design:type", String)
], ApiTokenDto.prototype, "notes", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Expiry date of the key, if set by the user at registration time',
        example: '2027-03-14T00:00:00.000Z',
    }),
    __metadata("design:type", Date)
], ApiTokenDto.prototype, "expires_at", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Creation date',
        example: '2023-03-10T14:30:00Z',
    }),
    __metadata("design:type", Date)
], ApiTokenDto.prototype, "created_at", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Last time the credential was used',
        example: '2023-03-15T09:45:22Z',
    }),
    __metadata("design:type", Date)
], ApiTokenDto.prototype, "last_used_at", void 0);
