"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.LmsCreateContentRequestDto$outboundSchema = exports.LmsCreateContentRequestDtoContentType$outboundSchema = exports.LmsCreateContentRequestDtoValue$outboundSchema = exports.LmsCreateContentRequestDtoSourceValue$outboundSchema = exports.LmsCreateContentRequestDto4$outboundSchema = exports.LmsCreateContentRequestDtoActive$outboundSchema = exports.LmsCreateContentRequestDto2$outboundSchema = exports.LmsCreateContentRequestDtoValue = exports.LmsCreateContentRequestDto2 = void 0;
exports.lmsCreateContentRequestDtoActiveToJSON = lmsCreateContentRequestDtoActiveToJSON;
exports.lmsCreateContentRequestDto4ToJSON = lmsCreateContentRequestDto4ToJSON;
exports.lmsCreateContentRequestDtoSourceValueToJSON = lmsCreateContentRequestDtoSourceValueToJSON;
exports.lmsCreateContentRequestDtoContentTypeToJSON = lmsCreateContentRequestDtoContentTypeToJSON;
exports.lmsCreateContentRequestDtoToJSON = lmsCreateContentRequestDtoToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const openEnums = __importStar(require("../../types/enums.js"));
const additionaldata_js_1 = require("./additionaldata.js");
const authormodel_js_1 = require("./authormodel.js");
const createcategoriesapimodel_js_1 = require("./createcategoriesapimodel.js");
const createskillsapimodel_js_1 = require("./createskillsapimodel.js");
const languageenum_js_1 = require("./languageenum.js");
const localizationmodel_js_1 = require("./localizationmodel.js");
var LmsCreateContentRequestDto2;
(function (LmsCreateContentRequestDto2) {
    LmsCreateContentRequestDto2["True"] = "true";
    LmsCreateContentRequestDto2["False"] = "false";
})(LmsCreateContentRequestDto2 || (exports.LmsCreateContentRequestDto2 = LmsCreateContentRequestDto2 = {}));
/**
 * The content type for write operations. Provide one of the listed enum values. If omitted or set to "unmapped_value", the source_value will be sent to the provider instead.
 */
var LmsCreateContentRequestDtoValue;
(function (LmsCreateContentRequestDtoValue) {
    LmsCreateContentRequestDtoValue["Video"] = "video";
    LmsCreateContentRequestDtoValue["Quiz"] = "quiz";
    LmsCreateContentRequestDtoValue["Document"] = "document";
    LmsCreateContentRequestDtoValue["Audio"] = "audio";
    LmsCreateContentRequestDtoValue["Article"] = "article";
    LmsCreateContentRequestDtoValue["Book"] = "book";
    LmsCreateContentRequestDtoValue["Event"] = "event";
    LmsCreateContentRequestDtoValue["Course"] = "course";
    LmsCreateContentRequestDtoValue["Collection"] = "collection";
    LmsCreateContentRequestDtoValue["Interactive"] = "interactive";
    LmsCreateContentRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(LmsCreateContentRequestDtoValue || (exports.LmsCreateContentRequestDtoValue = LmsCreateContentRequestDtoValue = {}));
/** @internal */
exports.LmsCreateContentRequestDto2$outboundSchema = z.nativeEnum(LmsCreateContentRequestDto2);
/** @internal */
exports.LmsCreateContentRequestDtoActive$outboundSchema = z.union([z.boolean(), exports.LmsCreateContentRequestDto2$outboundSchema]);
function lmsCreateContentRequestDtoActiveToJSON(lmsCreateContentRequestDtoActive) {
    return JSON.stringify(exports.LmsCreateContentRequestDtoActive$outboundSchema.parse(lmsCreateContentRequestDtoActive));
}
/** @internal */
exports.LmsCreateContentRequestDto4$outboundSchema = z.object({});
function lmsCreateContentRequestDto4ToJSON(lmsCreateContentRequestDto4) {
    return JSON.stringify(exports.LmsCreateContentRequestDto4$outboundSchema.parse(lmsCreateContentRequestDto4));
}
/** @internal */
exports.LmsCreateContentRequestDtoSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.LmsCreateContentRequestDto4$outboundSchema),
    z.array(z.any()),
]);
function lmsCreateContentRequestDtoSourceValueToJSON(lmsCreateContentRequestDtoSourceValue) {
    return JSON.stringify(exports.LmsCreateContentRequestDtoSourceValue$outboundSchema.parse(lmsCreateContentRequestDtoSourceValue));
}
/** @internal */
exports.LmsCreateContentRequestDtoValue$outboundSchema = openEnums.outboundSchema(LmsCreateContentRequestDtoValue);
/** @internal */
exports.LmsCreateContentRequestDtoContentType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.LmsCreateContentRequestDto4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.LmsCreateContentRequestDtoValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
function lmsCreateContentRequestDtoContentTypeToJSON(lmsCreateContentRequestDtoContentType) {
    return JSON.stringify(exports.LmsCreateContentRequestDtoContentType$outboundSchema.parse(lmsCreateContentRequestDtoContentType));
}
/** @internal */
exports.LmsCreateContentRequestDto$outboundSchema = z.object({
    active: z.nullable(z.union([z.boolean(), exports.LmsCreateContentRequestDto2$outboundSchema])).optional(),
    additionalData: z.nullable(z.array(additionaldata_js_1.AdditionalData$outboundSchema)).optional(),
    authors: z.nullable(z.array(authormodel_js_1.AuthorModel$outboundSchema)).optional(),
    categories: z.nullable(z.array(createcategoriesapimodel_js_1.CreateCategoriesApiModel$outboundSchema))
        .optional(),
    contentType: z.nullable(z.lazy(() => exports.LmsCreateContentRequestDtoContentType$outboundSchema)).optional(),
    contentUrl: z.nullable(z.string()).optional(),
    coverUrl: z.nullable(z.string()).optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    description: z.nullable(z.string()).optional(),
    duration: z.nullable(z.string()).optional(),
    externalReference: z.string(),
    languages: z.nullable(z.array(languageenum_js_1.LanguageEnum$outboundSchema)).optional(),
    localizations: z.nullable(z.array(localizationmodel_js_1.LocalizationModel$outboundSchema))
        .optional(),
    mobileLaunchContentUrl: z.nullable(z.string()).optional(),
    order: z.nullable(z.number()).optional(),
    shortDescription: z.nullable(z.string()).optional(),
    skills: z.nullable(z.array(createskillsapimodel_js_1.CreateSkillsApiModel$outboundSchema)).optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    title: z.nullable(z.string()).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        additionalData: "additional_data",
        contentType: "content_type",
        contentUrl: "content_url",
        coverUrl: "cover_url",
        createdAt: "created_at",
        externalReference: "external_reference",
        mobileLaunchContentUrl: "mobile_launch_content_url",
        shortDescription: "short_description",
        unifiedCustomFields: "unified_custom_fields",
        updatedAt: "updated_at",
    });
});
function lmsCreateContentRequestDtoToJSON(lmsCreateContentRequestDto) {
    return JSON.stringify(exports.LmsCreateContentRequestDto$outboundSchema.parse(lmsCreateContentRequestDto));
}
//# sourceMappingURL=lmscreatecontentrequestdto.js.map