"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.LmsUpsertContentRequestDto$ = exports.LmsUpsertContentRequestDto$outboundSchema = exports.LmsUpsertContentRequestDto$inboundSchema = exports.LmsUpsertContentRequestDtoContentType$ = exports.LmsUpsertContentRequestDtoContentType$outboundSchema = exports.LmsUpsertContentRequestDtoContentType$inboundSchema = exports.LmsUpsertContentRequestDtoValue$ = exports.LmsUpsertContentRequestDtoValue$outboundSchema = exports.LmsUpsertContentRequestDtoValue$inboundSchema = exports.LmsUpsertContentRequestDtoSourceValue$ = exports.LmsUpsertContentRequestDtoSourceValue$outboundSchema = exports.LmsUpsertContentRequestDtoSourceValue$inboundSchema = exports.LmsUpsertContentRequestDto4$ = exports.LmsUpsertContentRequestDto4$outboundSchema = exports.LmsUpsertContentRequestDto4$inboundSchema = exports.LmsUpsertContentRequestDtoActive$ = exports.LmsUpsertContentRequestDtoActive$outboundSchema = exports.LmsUpsertContentRequestDtoActive$inboundSchema = exports.LmsUpsertContentRequestDto2$ = exports.LmsUpsertContentRequestDto2$outboundSchema = exports.LmsUpsertContentRequestDto2$inboundSchema = exports.LmsUpsertContentRequestDtoValue = exports.LmsUpsertContentRequestDto2 = void 0;
exports.lmsUpsertContentRequestDtoActiveToJSON = lmsUpsertContentRequestDtoActiveToJSON;
exports.lmsUpsertContentRequestDtoActiveFromJSON = lmsUpsertContentRequestDtoActiveFromJSON;
exports.lmsUpsertContentRequestDto4ToJSON = lmsUpsertContentRequestDto4ToJSON;
exports.lmsUpsertContentRequestDto4FromJSON = lmsUpsertContentRequestDto4FromJSON;
exports.lmsUpsertContentRequestDtoSourceValueToJSON = lmsUpsertContentRequestDtoSourceValueToJSON;
exports.lmsUpsertContentRequestDtoSourceValueFromJSON = lmsUpsertContentRequestDtoSourceValueFromJSON;
exports.lmsUpsertContentRequestDtoContentTypeToJSON = lmsUpsertContentRequestDtoContentTypeToJSON;
exports.lmsUpsertContentRequestDtoContentTypeFromJSON = lmsUpsertContentRequestDtoContentTypeFromJSON;
exports.lmsUpsertContentRequestDtoToJSON = lmsUpsertContentRequestDtoToJSON;
exports.lmsUpsertContentRequestDtoFromJSON = lmsUpsertContentRequestDtoFromJSON;
const z = __importStar(require("zod/v3"));
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 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 LmsUpsertContentRequestDto2;
(function (LmsUpsertContentRequestDto2) {
    LmsUpsertContentRequestDto2["True"] = "true";
    LmsUpsertContentRequestDto2["False"] = "false";
})(LmsUpsertContentRequestDto2 || (exports.LmsUpsertContentRequestDto2 = LmsUpsertContentRequestDto2 = {}));
/**
 * 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 LmsUpsertContentRequestDtoValue;
(function (LmsUpsertContentRequestDtoValue) {
    LmsUpsertContentRequestDtoValue["Video"] = "video";
    LmsUpsertContentRequestDtoValue["Quiz"] = "quiz";
    LmsUpsertContentRequestDtoValue["Document"] = "document";
    LmsUpsertContentRequestDtoValue["Audio"] = "audio";
    LmsUpsertContentRequestDtoValue["Article"] = "article";
    LmsUpsertContentRequestDtoValue["Book"] = "book";
    LmsUpsertContentRequestDtoValue["Event"] = "event";
    LmsUpsertContentRequestDtoValue["Course"] = "course";
    LmsUpsertContentRequestDtoValue["Collection"] = "collection";
    LmsUpsertContentRequestDtoValue["Interactive"] = "interactive";
    LmsUpsertContentRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(LmsUpsertContentRequestDtoValue || (exports.LmsUpsertContentRequestDtoValue = LmsUpsertContentRequestDtoValue = {}));
/** @internal */
exports.LmsUpsertContentRequestDto2$inboundSchema = z.nativeEnum(LmsUpsertContentRequestDto2);
/** @internal */
exports.LmsUpsertContentRequestDto2$outboundSchema = exports.LmsUpsertContentRequestDto2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsUpsertContentRequestDto2$;
(function (LmsUpsertContentRequestDto2$) {
    /** @deprecated use `LmsUpsertContentRequestDto2$inboundSchema` instead. */
    LmsUpsertContentRequestDto2$.inboundSchema = exports.LmsUpsertContentRequestDto2$inboundSchema;
    /** @deprecated use `LmsUpsertContentRequestDto2$outboundSchema` instead. */
    LmsUpsertContentRequestDto2$.outboundSchema = exports.LmsUpsertContentRequestDto2$outboundSchema;
})(LmsUpsertContentRequestDto2$ || (exports.LmsUpsertContentRequestDto2$ = LmsUpsertContentRequestDto2$ = {}));
/** @internal */
exports.LmsUpsertContentRequestDtoActive$inboundSchema = z.union([z.boolean(), exports.LmsUpsertContentRequestDto2$inboundSchema]);
/** @internal */
exports.LmsUpsertContentRequestDtoActive$outboundSchema = z.union([z.boolean(), exports.LmsUpsertContentRequestDto2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsUpsertContentRequestDtoActive$;
(function (LmsUpsertContentRequestDtoActive$) {
    /** @deprecated use `LmsUpsertContentRequestDtoActive$inboundSchema` instead. */
    LmsUpsertContentRequestDtoActive$.inboundSchema = exports.LmsUpsertContentRequestDtoActive$inboundSchema;
    /** @deprecated use `LmsUpsertContentRequestDtoActive$outboundSchema` instead. */
    LmsUpsertContentRequestDtoActive$.outboundSchema = exports.LmsUpsertContentRequestDtoActive$outboundSchema;
})(LmsUpsertContentRequestDtoActive$ || (exports.LmsUpsertContentRequestDtoActive$ = LmsUpsertContentRequestDtoActive$ = {}));
function lmsUpsertContentRequestDtoActiveToJSON(lmsUpsertContentRequestDtoActive) {
    return JSON.stringify(exports.LmsUpsertContentRequestDtoActive$outboundSchema.parse(lmsUpsertContentRequestDtoActive));
}
function lmsUpsertContentRequestDtoActiveFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsUpsertContentRequestDtoActive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsUpsertContentRequestDtoActive' from JSON`);
}
/** @internal */
exports.LmsUpsertContentRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.LmsUpsertContentRequestDto4$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 LmsUpsertContentRequestDto4$;
(function (LmsUpsertContentRequestDto4$) {
    /** @deprecated use `LmsUpsertContentRequestDto4$inboundSchema` instead. */
    LmsUpsertContentRequestDto4$.inboundSchema = exports.LmsUpsertContentRequestDto4$inboundSchema;
    /** @deprecated use `LmsUpsertContentRequestDto4$outboundSchema` instead. */
    LmsUpsertContentRequestDto4$.outboundSchema = exports.LmsUpsertContentRequestDto4$outboundSchema;
})(LmsUpsertContentRequestDto4$ || (exports.LmsUpsertContentRequestDto4$ = LmsUpsertContentRequestDto4$ = {}));
function lmsUpsertContentRequestDto4ToJSON(lmsUpsertContentRequestDto4) {
    return JSON.stringify(exports.LmsUpsertContentRequestDto4$outboundSchema.parse(lmsUpsertContentRequestDto4));
}
function lmsUpsertContentRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsUpsertContentRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsUpsertContentRequestDto4' from JSON`);
}
/** @internal */
exports.LmsUpsertContentRequestDtoSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.LmsUpsertContentRequestDto4$inboundSchema),
    z.array(z.any()),
]);
/** @internal */
exports.LmsUpsertContentRequestDtoSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.LmsUpsertContentRequestDto4$outboundSchema),
    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 LmsUpsertContentRequestDtoSourceValue$;
(function (LmsUpsertContentRequestDtoSourceValue$) {
    /** @deprecated use `LmsUpsertContentRequestDtoSourceValue$inboundSchema` instead. */
    LmsUpsertContentRequestDtoSourceValue$.inboundSchema = exports.LmsUpsertContentRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `LmsUpsertContentRequestDtoSourceValue$outboundSchema` instead. */
    LmsUpsertContentRequestDtoSourceValue$.outboundSchema = exports.LmsUpsertContentRequestDtoSourceValue$outboundSchema;
})(LmsUpsertContentRequestDtoSourceValue$ || (exports.LmsUpsertContentRequestDtoSourceValue$ = LmsUpsertContentRequestDtoSourceValue$ = {}));
function lmsUpsertContentRequestDtoSourceValueToJSON(lmsUpsertContentRequestDtoSourceValue) {
    return JSON.stringify(exports.LmsUpsertContentRequestDtoSourceValue$outboundSchema.parse(lmsUpsertContentRequestDtoSourceValue));
}
function lmsUpsertContentRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsUpsertContentRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsUpsertContentRequestDtoSourceValue' from JSON`);
}
/** @internal */
exports.LmsUpsertContentRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(LmsUpsertContentRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.LmsUpsertContentRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(LmsUpsertContentRequestDtoValue),
    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 LmsUpsertContentRequestDtoValue$;
(function (LmsUpsertContentRequestDtoValue$) {
    /** @deprecated use `LmsUpsertContentRequestDtoValue$inboundSchema` instead. */
    LmsUpsertContentRequestDtoValue$.inboundSchema = exports.LmsUpsertContentRequestDtoValue$inboundSchema;
    /** @deprecated use `LmsUpsertContentRequestDtoValue$outboundSchema` instead. */
    LmsUpsertContentRequestDtoValue$.outboundSchema = exports.LmsUpsertContentRequestDtoValue$outboundSchema;
})(LmsUpsertContentRequestDtoValue$ || (exports.LmsUpsertContentRequestDtoValue$ = LmsUpsertContentRequestDtoValue$ = {}));
/** @internal */
exports.LmsUpsertContentRequestDtoContentType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.LmsUpsertContentRequestDto4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.LmsUpsertContentRequestDtoValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.LmsUpsertContentRequestDtoContentType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.LmsUpsertContentRequestDto4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.LmsUpsertContentRequestDtoValue$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 LmsUpsertContentRequestDtoContentType$;
(function (LmsUpsertContentRequestDtoContentType$) {
    /** @deprecated use `LmsUpsertContentRequestDtoContentType$inboundSchema` instead. */
    LmsUpsertContentRequestDtoContentType$.inboundSchema = exports.LmsUpsertContentRequestDtoContentType$inboundSchema;
    /** @deprecated use `LmsUpsertContentRequestDtoContentType$outboundSchema` instead. */
    LmsUpsertContentRequestDtoContentType$.outboundSchema = exports.LmsUpsertContentRequestDtoContentType$outboundSchema;
})(LmsUpsertContentRequestDtoContentType$ || (exports.LmsUpsertContentRequestDtoContentType$ = LmsUpsertContentRequestDtoContentType$ = {}));
function lmsUpsertContentRequestDtoContentTypeToJSON(lmsUpsertContentRequestDtoContentType) {
    return JSON.stringify(exports.LmsUpsertContentRequestDtoContentType$outboundSchema.parse(lmsUpsertContentRequestDtoContentType));
}
function lmsUpsertContentRequestDtoContentTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsUpsertContentRequestDtoContentType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsUpsertContentRequestDtoContentType' from JSON`);
}
/** @internal */
exports.LmsUpsertContentRequestDto$inboundSchema = z.object({
    active: z.nullable(z.union([z.boolean(), exports.LmsUpsertContentRequestDto2$inboundSchema])).optional(),
    additional_data: z.nullable(z.array(additionaldata_js_1.AdditionalData$inboundSchema)).optional(),
    authors: z.nullable(z.array(authormodel_js_1.AuthorModel$inboundSchema)).optional(),
    categories: z.nullable(z.array(createcategoriesapimodel_js_1.CreateCategoriesApiModel$inboundSchema))
        .optional(),
    content_type: z.nullable(z.lazy(() => exports.LmsUpsertContentRequestDtoContentType$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.string(),
    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.LmsUpsertContentRequestDto$outboundSchema = z.object({
    active: z.nullable(z.union([z.boolean(), exports.LmsUpsertContentRequestDto2$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.LmsUpsertContentRequestDtoContentType$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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsUpsertContentRequestDto$;
(function (LmsUpsertContentRequestDto$) {
    /** @deprecated use `LmsUpsertContentRequestDto$inboundSchema` instead. */
    LmsUpsertContentRequestDto$.inboundSchema = exports.LmsUpsertContentRequestDto$inboundSchema;
    /** @deprecated use `LmsUpsertContentRequestDto$outboundSchema` instead. */
    LmsUpsertContentRequestDto$.outboundSchema = exports.LmsUpsertContentRequestDto$outboundSchema;
})(LmsUpsertContentRequestDto$ || (exports.LmsUpsertContentRequestDto$ = LmsUpsertContentRequestDto$ = {}));
function lmsUpsertContentRequestDtoToJSON(lmsUpsertContentRequestDto) {
    return JSON.stringify(exports.LmsUpsertContentRequestDto$outboundSchema.parse(lmsUpsertContentRequestDto));
}
function lmsUpsertContentRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsUpsertContentRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsUpsertContentRequestDto' from JSON`);
}
//# sourceMappingURL=lmsupsertcontentrequestdto.js.map