"use strict";
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
    var _, done = false;
    for (var i = decorators.length - 1; i >= 0; i--) {
        var context = {};
        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
        if (kind === "accessor") {
            if (result === void 0) continue;
            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
            if (_ = accept(result.get)) descriptor.get = _;
            if (_ = accept(result.set)) descriptor.set = _;
            if (_ = accept(result.init)) initializers.unshift(_);
        }
        else if (_ = accept(result)) {
            if (kind === "field") initializers.unshift(_);
            else descriptor[key] = _;
        }
    }
    if (target) Object.defineProperty(target, contextIn.name, descriptor);
    done = true;
};
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
    var useValue = arguments.length > 2;
    for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
    }
    return useValue ? value : void 0;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateEpisodeDto = void 0;
var class_validator_1 = require("class-validator");
var swagger_1 = require("@nestjs/swagger");
var CreateEpisodeDto = function () {
    var _a;
    var _number_decorators;
    var _number_initializers = [];
    var _number_extraInitializers = [];
    var _title_decorators;
    var _title_initializers = [];
    var _title_extraInitializers = [];
    var _streamUrl_decorators;
    var _streamUrl_initializers = [];
    var _streamUrl_extraInitializers = [];
    var _durationMin_decorators;
    var _durationMin_initializers = [];
    var _durationMin_extraInitializers = [];
    var _thumbnailUrl_decorators;
    var _thumbnailUrl_initializers = [];
    var _thumbnailUrl_extraInitializers = [];
    return _a = /** @class */ (function () {
            function CreateEpisodeDto() {
                this.number = __runInitializers(this, _number_initializers, void 0);
                this.title = (__runInitializers(this, _number_extraInitializers), __runInitializers(this, _title_initializers, void 0));
                this.streamUrl = (__runInitializers(this, _title_extraInitializers), __runInitializers(this, _streamUrl_initializers, void 0));
                this.durationMin = (__runInitializers(this, _streamUrl_extraInitializers), __runInitializers(this, _durationMin_initializers, void 0));
                this.thumbnailUrl = (__runInitializers(this, _durationMin_extraInitializers), __runInitializers(this, _thumbnailUrl_initializers, void 0));
                __runInitializers(this, _thumbnailUrl_extraInitializers);
            }
            return CreateEpisodeDto;
        }()),
        (function () {
            var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
            _number_decorators = [(0, swagger_1.ApiProperty)({ example: 1 }), (0, class_validator_1.IsInt)(), (0, class_validator_1.IsNotEmpty)(), (0, class_validator_1.Min)(1)];
            _title_decorators = [(0, swagger_1.ApiProperty)({ example: 'Pilot' }), (0, class_validator_1.IsString)(), (0, class_validator_1.IsNotEmpty)()];
            _streamUrl_decorators = [(0, swagger_1.ApiProperty)({ example: 'https://stream.example.com/series/s01e01.m3u8' }), (0, class_validator_1.IsString)(), (0, class_validator_1.IsNotEmpty)()];
            _durationMin_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: 58 }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsInt)(), (0, class_validator_1.Min)(1)];
            _thumbnailUrl_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: 'https://example.com/thumb.jpg' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)()];
            __esDecorate(null, null, _number_decorators, { kind: "field", name: "number", static: false, private: false, access: { has: function (obj) { return "number" in obj; }, get: function (obj) { return obj.number; }, set: function (obj, value) { obj.number = value; } }, metadata: _metadata }, _number_initializers, _number_extraInitializers);
            __esDecorate(null, null, _title_decorators, { kind: "field", name: "title", static: false, private: false, access: { has: function (obj) { return "title" in obj; }, get: function (obj) { return obj.title; }, set: function (obj, value) { obj.title = value; } }, metadata: _metadata }, _title_initializers, _title_extraInitializers);
            __esDecorate(null, null, _streamUrl_decorators, { kind: "field", name: "streamUrl", static: false, private: false, access: { has: function (obj) { return "streamUrl" in obj; }, get: function (obj) { return obj.streamUrl; }, set: function (obj, value) { obj.streamUrl = value; } }, metadata: _metadata }, _streamUrl_initializers, _streamUrl_extraInitializers);
            __esDecorate(null, null, _durationMin_decorators, { kind: "field", name: "durationMin", static: false, private: false, access: { has: function (obj) { return "durationMin" in obj; }, get: function (obj) { return obj.durationMin; }, set: function (obj, value) { obj.durationMin = value; } }, metadata: _metadata }, _durationMin_initializers, _durationMin_extraInitializers);
            __esDecorate(null, null, _thumbnailUrl_decorators, { kind: "field", name: "thumbnailUrl", static: false, private: false, access: { has: function (obj) { return "thumbnailUrl" in obj; }, get: function (obj) { return obj.thumbnailUrl; }, set: function (obj, value) { obj.thumbnailUrl = value; } }, metadata: _metadata }, _thumbnailUrl_initializers, _thumbnailUrl_extraInitializers);
            if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        })(),
        _a;
}();
exports.CreateEpisodeDto = CreateEpisodeDto;
