"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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.lmsCreateContentRequestDtoFromJSON = exports.lmsCreateContentRequestDtoToJSON = exports.LmsCreateContentRequestDto$ = exports.LmsCreateContentRequestDto$outboundSchema = exports.LmsCreateContentRequestDto$inboundSchema = exports.lmsCreateContentRequestDtoContentTypeFromJSON = exports.lmsCreateContentRequestDtoContentTypeToJSON = exports.LmsCreateContentRequestDtoContentType$ = exports.LmsCreateContentRequestDtoContentType$outboundSchema = exports.LmsCreateContentRequestDtoContentType$inboundSchema = exports.LmsCreateContentRequestDtoValue$ = exports.LmsCreateContentRequestDtoValue$outboundSchema = exports.LmsCreateContentRequestDtoValue$inboundSchema = exports.lmsCreateContentRequestDtoSourceValueFromJSON = exports.lmsCreateContentRequestDtoSourceValueToJSON = exports.LmsCreateContentRequestDtoSourceValue$ = exports.LmsCreateContentRequestDtoSourceValue$outboundSchema = exports.LmsCreateContentRequestDtoSourceValue$inboundSchema = exports.lmsCreateContentRequestDto4FromJSON = exports.lmsCreateContentRequestDto4ToJSON = exports.LmsCreateContentRequestDto4$ = exports.LmsCreateContentRequestDto4$outboundSchema = exports.LmsCreateContentRequestDto4$inboundSchema = exports.LmsCreateContentRequestDtoValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = require("../../types/enums.js");
const additionaldata_js_1 = require("./additionaldata.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 LmsCreateContentRequestDtoValue;
(function (LmsCreateContentRequestDtoValue) {
    LmsCreateContentRequestDtoValue["Video"] = "video";
    LmsCreateContentRequestDtoValue["Quiz"] = "quiz";
    LmsCreateContentRequestDtoValue["Document"] = "document";
    LmsCreateContentRequestDtoValue["Audio"] = "audio";
    LmsCreateContentRequestDtoValue["Article"] = "article";
    LmsCreateContentRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(LmsCreateContentRequestDtoValue || (exports.LmsCreateContentRequestDtoValue = LmsCreateContentRequestDtoValue = {}));
/** @internal */
exports.LmsCreateContentRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.LmsCreateContentRequestDto4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsCreateContentRequestDto4$;
(function (LmsCreateContentRequestDto4$) {
    /** @deprecated use `LmsCreateContentRequestDto4$inboundSchema` instead. */
    LmsCreateContentRequestDto4$.inboundSchema = exports.LmsCreateContentRequestDto4$inboundSchema;
    /** @deprecated use `LmsCreateContentRequestDto4$outboundSchema` instead. */
    LmsCreateContentRequestDto4$.outboundSchema = exports.LmsCreateContentRequestDto4$outboundSchema;
})(LmsCreateContentRequestDto4$ || (exports.LmsCreateContentRequestDto4$ = LmsCreateContentRequestDto4$ = {}));
function lmsCreateContentRequestDto4ToJSON(lmsCreateContentRequestDto4) {
    return JSON.stringify(exports.LmsCreateContentRequestDto4$outboundSchema.parse(lmsCreateContentRequestDto4));
}
exports.lmsCreateContentRequestDto4ToJSON = lmsCreateContentRequestDto4ToJSON;
function lmsCreateContentRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsCreateContentRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsCreateContentRequestDto4' from JSON`);
}
exports.lmsCreateContentRequestDto4FromJSON = lmsCreateContentRequestDto4FromJSON;
/** @internal */
exports.LmsCreateContentRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.LmsCreateContentRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.LmsCreateContentRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.LmsCreateContentRequestDto4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsCreateContentRequestDtoSourceValue$;
(function (LmsCreateContentRequestDtoSourceValue$) {
    /** @deprecated use `LmsCreateContentRequestDtoSourceValue$inboundSchema` instead. */
    LmsCreateContentRequestDtoSourceValue$.inboundSchema = exports.LmsCreateContentRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `LmsCreateContentRequestDtoSourceValue$outboundSchema` instead. */
    LmsCreateContentRequestDtoSourceValue$.outboundSchema = exports.LmsCreateContentRequestDtoSourceValue$outboundSchema;
})(LmsCreateContentRequestDtoSourceValue$ || (exports.LmsCreateContentRequestDtoSourceValue$ = LmsCreateContentRequestDtoSourceValue$ = {}));
function lmsCreateContentRequestDtoSourceValueToJSON(lmsCreateContentRequestDtoSourceValue) {
    return JSON.stringify(exports.LmsCreateContentRequestDtoSourceValue$outboundSchema.parse(lmsCreateContentRequestDtoSourceValue));
}
exports.lmsCreateContentRequestDtoSourceValueToJSON = lmsCreateContentRequestDtoSourceValueToJSON;
function lmsCreateContentRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsCreateContentRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsCreateContentRequestDtoSourceValue' from JSON`);
}
exports.lmsCreateContentRequestDtoSourceValueFromJSON = lmsCreateContentRequestDtoSourceValueFromJSON;
/** @internal */
exports.LmsCreateContentRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(LmsCreateContentRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.LmsCreateContentRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(LmsCreateContentRequestDtoValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsCreateContentRequestDtoValue$;
(function (LmsCreateContentRequestDtoValue$) {
    /** @deprecated use `LmsCreateContentRequestDtoValue$inboundSchema` instead. */
    LmsCreateContentRequestDtoValue$.inboundSchema = exports.LmsCreateContentRequestDtoValue$inboundSchema;
    /** @deprecated use `LmsCreateContentRequestDtoValue$outboundSchema` instead. */
    LmsCreateContentRequestDtoValue$.outboundSchema = exports.LmsCreateContentRequestDtoValue$outboundSchema;
})(LmsCreateContentRequestDtoValue$ || (exports.LmsCreateContentRequestDtoValue$ = LmsCreateContentRequestDtoValue$ = {}));
/** @internal */
exports.LmsCreateContentRequestDtoContentType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.LmsCreateContentRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.LmsCreateContentRequestDtoValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.LmsCreateContentRequestDtoContentType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.LmsCreateContentRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.LmsCreateContentRequestDtoValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsCreateContentRequestDtoContentType$;
(function (LmsCreateContentRequestDtoContentType$) {
    /** @deprecated use `LmsCreateContentRequestDtoContentType$inboundSchema` instead. */
    LmsCreateContentRequestDtoContentType$.inboundSchema = exports.LmsCreateContentRequestDtoContentType$inboundSchema;
    /** @deprecated use `LmsCreateContentRequestDtoContentType$outboundSchema` instead. */
    LmsCreateContentRequestDtoContentType$.outboundSchema = exports.LmsCreateContentRequestDtoContentType$outboundSchema;
})(LmsCreateContentRequestDtoContentType$ || (exports.LmsCreateContentRequestDtoContentType$ = LmsCreateContentRequestDtoContentType$ = {}));
function lmsCreateContentRequestDtoContentTypeToJSON(lmsCreateContentRequestDtoContentType) {
    return JSON.stringify(exports.LmsCreateContentRequestDtoContentType$outboundSchema.parse(lmsCreateContentRequestDtoContentType));
}
exports.lmsCreateContentRequestDtoContentTypeToJSON = lmsCreateContentRequestDtoContentTypeToJSON;
function lmsCreateContentRequestDtoContentTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsCreateContentRequestDtoContentType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsCreateContentRequestDtoContentType' from JSON`);
}
exports.lmsCreateContentRequestDtoContentTypeFromJSON = lmsCreateContentRequestDtoContentTypeFromJSON;
/** @internal */
exports.LmsCreateContentRequestDto$inboundSchema = z.object({
    active: z.nullable(z.boolean()).optional(),
    additional_data: z.nullable(z.array(additionaldata_js_1.AdditionalData$inboundSchema)).optional(),
    categories: z.nullable(z.array(createcategoriesapimodel_js_1.CreateCategoriesApiModel$inboundSchema))
        .optional(),
    content_type: z.nullable(z.lazy(() => exports.LmsCreateContentRequestDtoContentType$inboundSchema)).optional(),
    content_url: z.nullable(z.string()).optional(),
    cover_url: z.nullable(z.string()).optional(),
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    description: z.nullable(z.string()).optional(),
    duration: z.nullable(z.string()).optional(),
    external_reference: z.nullable(z.string()).optional(),
    languages: z.nullable(z.array(languageenum_js_1.LanguageEnum$inboundSchema)).optional(),
    localizations: z.nullable(z.array(localizationmodel_js_1.LocalizationModel$inboundSchema))
        .optional(),
    mobile_launch_content_url: z.nullable(z.string()).optional(),
    order: z.nullable(z.number()).optional(),
    short_description: z.nullable(z.string()).optional(),
    skills: z.nullable(z.array(createskillsapimodel_js_1.CreateSkillsApiModel$inboundSchema)).optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    title: z.nullable(z.string()).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
    updated_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "additional_data": "additionalData",
        "content_type": "contentType",
        "content_url": "contentUrl",
        "cover_url": "coverUrl",
        "created_at": "createdAt",
        "external_reference": "externalReference",
        "mobile_launch_content_url": "mobileLaunchContentUrl",
        "short_description": "shortDescription",
        "unified_custom_fields": "unifiedCustomFields",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.LmsCreateContentRequestDto$outboundSchema = z.object({
    active: z.nullable(z.boolean()).optional(),
    additionalData: z.nullable(z.array(additionaldata_js_1.AdditionalData$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.nullable(z.string()).optional(),
    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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsCreateContentRequestDto$;
(function (LmsCreateContentRequestDto$) {
    /** @deprecated use `LmsCreateContentRequestDto$inboundSchema` instead. */
    LmsCreateContentRequestDto$.inboundSchema = exports.LmsCreateContentRequestDto$inboundSchema;
    /** @deprecated use `LmsCreateContentRequestDto$outboundSchema` instead. */
    LmsCreateContentRequestDto$.outboundSchema = exports.LmsCreateContentRequestDto$outboundSchema;
})(LmsCreateContentRequestDto$ || (exports.LmsCreateContentRequestDto$ = LmsCreateContentRequestDto$ = {}));
function lmsCreateContentRequestDtoToJSON(lmsCreateContentRequestDto) {
    return JSON.stringify(exports.LmsCreateContentRequestDto$outboundSchema.parse(lmsCreateContentRequestDto));
}
exports.lmsCreateContentRequestDtoToJSON = lmsCreateContentRequestDtoToJSON;
function lmsCreateContentRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsCreateContentRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsCreateContentRequestDto' from JSON`);
}
exports.lmsCreateContentRequestDtoFromJSON = lmsCreateContentRequestDtoFromJSON;
//# sourceMappingURL=lmscreatecontentrequestdto.js.map