"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.CreateMovieDto = void 0;
var class_validator_1 = require("class-validator");
var swagger_1 = require("@nestjs/swagger");
var CreateMovieDto = function () {
    var _a;
    var _title_decorators;
    var _title_initializers = [];
    var _title_extraInitializers = [];
    var _synopsis_decorators;
    var _synopsis_initializers = [];
    var _synopsis_extraInitializers = [];
    var _posterUrl_decorators;
    var _posterUrl_initializers = [];
    var _posterUrl_extraInitializers = [];
    var _backdropUrl_decorators;
    var _backdropUrl_initializers = [];
    var _backdropUrl_extraInitializers = [];
    var _streamUrl_decorators;
    var _streamUrl_initializers = [];
    var _streamUrl_extraInitializers = [];
    var _durationMin_decorators;
    var _durationMin_initializers = [];
    var _durationMin_extraInitializers = [];
    var _year_decorators;
    var _year_initializers = [];
    var _year_extraInitializers = [];
    var _rating_decorators;
    var _rating_initializers = [];
    var _rating_extraInitializers = [];
    var _isActive_decorators;
    var _isActive_initializers = [];
    var _isActive_extraInitializers = [];
    var _categoryIds_decorators;
    var _categoryIds_initializers = [];
    var _categoryIds_extraInitializers = [];
    return _a = /** @class */ (function () {
            function CreateMovieDto() {
                this.title = __runInitializers(this, _title_initializers, void 0);
                this.synopsis = (__runInitializers(this, _title_extraInitializers), __runInitializers(this, _synopsis_initializers, void 0));
                this.posterUrl = (__runInitializers(this, _synopsis_extraInitializers), __runInitializers(this, _posterUrl_initializers, void 0));
                this.backdropUrl = (__runInitializers(this, _posterUrl_extraInitializers), __runInitializers(this, _backdropUrl_initializers, void 0));
                this.streamUrl = (__runInitializers(this, _backdropUrl_extraInitializers), __runInitializers(this, _streamUrl_initializers, void 0));
                this.durationMin = (__runInitializers(this, _streamUrl_extraInitializers), __runInitializers(this, _durationMin_initializers, void 0));
                this.year = (__runInitializers(this, _durationMin_extraInitializers), __runInitializers(this, _year_initializers, void 0));
                this.rating = (__runInitializers(this, _year_extraInitializers), __runInitializers(this, _rating_initializers, void 0));
                this.isActive = (__runInitializers(this, _rating_extraInitializers), __runInitializers(this, _isActive_initializers, void 0));
                this.categoryIds = (__runInitializers(this, _isActive_extraInitializers), __runInitializers(this, _categoryIds_initializers, void 0));
                __runInitializers(this, _categoryIds_extraInitializers);
            }
            return CreateMovieDto;
        }()),
        (function () {
            var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
            _title_decorators = [(0, swagger_1.ApiProperty)({ example: 'Inception' }), (0, class_validator_1.IsString)(), (0, class_validator_1.IsNotEmpty)()];
            _synopsis_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: 'A mind-bending thriller...' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)()];
            _posterUrl_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: 'https://example.com/poster.jpg' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)()];
            _backdropUrl_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: 'https://example.com/backdrop.jpg' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)()];
            _streamUrl_decorators = [(0, swagger_1.ApiProperty)({ example: 'https://stream.example.com/movie/inception.m3u8' }), (0, class_validator_1.IsString)(), (0, class_validator_1.IsNotEmpty)()];
            _durationMin_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: 148 }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsInt)(), (0, class_validator_1.Min)(1)];
            _year_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: 2010 }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsInt)(), (0, class_validator_1.Min)(1900), (0, class_validator_1.Max)(2100)];
            _rating_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: 8.8 }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsNumber)(), (0, class_validator_1.Min)(0), (0, class_validator_1.Max)(10)];
            _isActive_decorators = [(0, swagger_1.ApiPropertyOptional)({ example: true }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsBoolean)()];
            _categoryIds_decorators = [(0, swagger_1.ApiPropertyOptional)({ type: [String], example: ['uuid1', 'uuid2'] }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsArray)(), (0, class_validator_1.IsUUID)('4', { each: true })];
            __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, _synopsis_decorators, { kind: "field", name: "synopsis", static: false, private: false, access: { has: function (obj) { return "synopsis" in obj; }, get: function (obj) { return obj.synopsis; }, set: function (obj, value) { obj.synopsis = value; } }, metadata: _metadata }, _synopsis_initializers, _synopsis_extraInitializers);
            __esDecorate(null, null, _posterUrl_decorators, { kind: "field", name: "posterUrl", static: false, private: false, access: { has: function (obj) { return "posterUrl" in obj; }, get: function (obj) { return obj.posterUrl; }, set: function (obj, value) { obj.posterUrl = value; } }, metadata: _metadata }, _posterUrl_initializers, _posterUrl_extraInitializers);
            __esDecorate(null, null, _backdropUrl_decorators, { kind: "field", name: "backdropUrl", static: false, private: false, access: { has: function (obj) { return "backdropUrl" in obj; }, get: function (obj) { return obj.backdropUrl; }, set: function (obj, value) { obj.backdropUrl = value; } }, metadata: _metadata }, _backdropUrl_initializers, _backdropUrl_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, _year_decorators, { kind: "field", name: "year", static: false, private: false, access: { has: function (obj) { return "year" in obj; }, get: function (obj) { return obj.year; }, set: function (obj, value) { obj.year = value; } }, metadata: _metadata }, _year_initializers, _year_extraInitializers);
            __esDecorate(null, null, _rating_decorators, { kind: "field", name: "rating", static: false, private: false, access: { has: function (obj) { return "rating" in obj; }, get: function (obj) { return obj.rating; }, set: function (obj, value) { obj.rating = value; } }, metadata: _metadata }, _rating_initializers, _rating_extraInitializers);
            __esDecorate(null, null, _isActive_decorators, { kind: "field", name: "isActive", static: false, private: false, access: { has: function (obj) { return "isActive" in obj; }, get: function (obj) { return obj.isActive; }, set: function (obj, value) { obj.isActive = value; } }, metadata: _metadata }, _isActive_initializers, _isActive_extraInitializers);
            __esDecorate(null, null, _categoryIds_decorators, { kind: "field", name: "categoryIds", static: false, private: false, access: { has: function (obj) { return "categoryIds" in obj; }, get: function (obj) { return obj.categoryIds; }, set: function (obj, value) { obj.categoryIds = value; } }, metadata: _metadata }, _categoryIds_initializers, _categoryIds_extraInitializers);
            if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        })(),
        _a;
}();
exports.CreateMovieDto = CreateMovieDto;
