"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.lmsCreateCompletionRequestDtoFromJSON = exports.lmsCreateCompletionRequestDtoToJSON = exports.LmsCreateCompletionRequestDto$ = exports.LmsCreateCompletionRequestDto$outboundSchema = exports.LmsCreateCompletionRequestDto$inboundSchema = exports.lmsCreateCompletionRequestDtoResultFromJSON = exports.lmsCreateCompletionRequestDtoResultToJSON = exports.LmsCreateCompletionRequestDtoResult$ = exports.LmsCreateCompletionRequestDtoResult$outboundSchema = exports.LmsCreateCompletionRequestDtoResult$inboundSchema = exports.LmsCreateCompletionRequestDtoValue$ = exports.LmsCreateCompletionRequestDtoValue$outboundSchema = exports.LmsCreateCompletionRequestDtoValue$inboundSchema = exports.lmsCreateCompletionRequestDtoSourceValueFromJSON = exports.lmsCreateCompletionRequestDtoSourceValueToJSON = exports.LmsCreateCompletionRequestDtoSourceValue$ = exports.LmsCreateCompletionRequestDtoSourceValue$outboundSchema = exports.LmsCreateCompletionRequestDtoSourceValue$inboundSchema = exports.lmsCreateCompletionRequestDto4FromJSON = exports.lmsCreateCompletionRequestDto4ToJSON = exports.LmsCreateCompletionRequestDto4$ = exports.LmsCreateCompletionRequestDto4$outboundSchema = exports.LmsCreateCompletionRequestDto4$inboundSchema = exports.LmsCreateCompletionRequestDtoValue = 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");
var LmsCreateCompletionRequestDtoValue;
(function (LmsCreateCompletionRequestDtoValue) {
    LmsCreateCompletionRequestDtoValue["Pass"] = "Pass";
    LmsCreateCompletionRequestDtoValue["Fail"] = "Fail";
    LmsCreateCompletionRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(LmsCreateCompletionRequestDtoValue || (exports.LmsCreateCompletionRequestDtoValue = LmsCreateCompletionRequestDtoValue = {}));
/** @internal */
exports.LmsCreateCompletionRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.LmsCreateCompletionRequestDto4$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 LmsCreateCompletionRequestDto4$;
(function (LmsCreateCompletionRequestDto4$) {
    /** @deprecated use `LmsCreateCompletionRequestDto4$inboundSchema` instead. */
    LmsCreateCompletionRequestDto4$.inboundSchema = exports.LmsCreateCompletionRequestDto4$inboundSchema;
    /** @deprecated use `LmsCreateCompletionRequestDto4$outboundSchema` instead. */
    LmsCreateCompletionRequestDto4$.outboundSchema = exports.LmsCreateCompletionRequestDto4$outboundSchema;
})(LmsCreateCompletionRequestDto4$ || (exports.LmsCreateCompletionRequestDto4$ = LmsCreateCompletionRequestDto4$ = {}));
function lmsCreateCompletionRequestDto4ToJSON(lmsCreateCompletionRequestDto4) {
    return JSON.stringify(exports.LmsCreateCompletionRequestDto4$outboundSchema.parse(lmsCreateCompletionRequestDto4));
}
exports.lmsCreateCompletionRequestDto4ToJSON = lmsCreateCompletionRequestDto4ToJSON;
function lmsCreateCompletionRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsCreateCompletionRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsCreateCompletionRequestDto4' from JSON`);
}
exports.lmsCreateCompletionRequestDto4FromJSON = lmsCreateCompletionRequestDto4FromJSON;
/** @internal */
exports.LmsCreateCompletionRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.LmsCreateCompletionRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.LmsCreateCompletionRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.LmsCreateCompletionRequestDto4$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 LmsCreateCompletionRequestDtoSourceValue$;
(function (LmsCreateCompletionRequestDtoSourceValue$) {
    /** @deprecated use `LmsCreateCompletionRequestDtoSourceValue$inboundSchema` instead. */
    LmsCreateCompletionRequestDtoSourceValue$.inboundSchema = exports.LmsCreateCompletionRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `LmsCreateCompletionRequestDtoSourceValue$outboundSchema` instead. */
    LmsCreateCompletionRequestDtoSourceValue$.outboundSchema = exports.LmsCreateCompletionRequestDtoSourceValue$outboundSchema;
})(LmsCreateCompletionRequestDtoSourceValue$ || (exports.LmsCreateCompletionRequestDtoSourceValue$ = LmsCreateCompletionRequestDtoSourceValue$ = {}));
function lmsCreateCompletionRequestDtoSourceValueToJSON(lmsCreateCompletionRequestDtoSourceValue) {
    return JSON.stringify(exports.LmsCreateCompletionRequestDtoSourceValue$outboundSchema.parse(lmsCreateCompletionRequestDtoSourceValue));
}
exports.lmsCreateCompletionRequestDtoSourceValueToJSON = lmsCreateCompletionRequestDtoSourceValueToJSON;
function lmsCreateCompletionRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsCreateCompletionRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsCreateCompletionRequestDtoSourceValue' from JSON`);
}
exports.lmsCreateCompletionRequestDtoSourceValueFromJSON = lmsCreateCompletionRequestDtoSourceValueFromJSON;
/** @internal */
exports.LmsCreateCompletionRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(LmsCreateCompletionRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.LmsCreateCompletionRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(LmsCreateCompletionRequestDtoValue),
    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 LmsCreateCompletionRequestDtoValue$;
(function (LmsCreateCompletionRequestDtoValue$) {
    /** @deprecated use `LmsCreateCompletionRequestDtoValue$inboundSchema` instead. */
    LmsCreateCompletionRequestDtoValue$.inboundSchema = exports.LmsCreateCompletionRequestDtoValue$inboundSchema;
    /** @deprecated use `LmsCreateCompletionRequestDtoValue$outboundSchema` instead. */
    LmsCreateCompletionRequestDtoValue$.outboundSchema = exports.LmsCreateCompletionRequestDtoValue$outboundSchema;
})(LmsCreateCompletionRequestDtoValue$ || (exports.LmsCreateCompletionRequestDtoValue$ = LmsCreateCompletionRequestDtoValue$ = {}));
/** @internal */
exports.LmsCreateCompletionRequestDtoResult$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.LmsCreateCompletionRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.LmsCreateCompletionRequestDtoValue$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.LmsCreateCompletionRequestDtoResult$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.LmsCreateCompletionRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.LmsCreateCompletionRequestDtoValue$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 LmsCreateCompletionRequestDtoResult$;
(function (LmsCreateCompletionRequestDtoResult$) {
    /** @deprecated use `LmsCreateCompletionRequestDtoResult$inboundSchema` instead. */
    LmsCreateCompletionRequestDtoResult$.inboundSchema = exports.LmsCreateCompletionRequestDtoResult$inboundSchema;
    /** @deprecated use `LmsCreateCompletionRequestDtoResult$outboundSchema` instead. */
    LmsCreateCompletionRequestDtoResult$.outboundSchema = exports.LmsCreateCompletionRequestDtoResult$outboundSchema;
})(LmsCreateCompletionRequestDtoResult$ || (exports.LmsCreateCompletionRequestDtoResult$ = LmsCreateCompletionRequestDtoResult$ = {}));
function lmsCreateCompletionRequestDtoResultToJSON(lmsCreateCompletionRequestDtoResult) {
    return JSON.stringify(exports.LmsCreateCompletionRequestDtoResult$outboundSchema.parse(lmsCreateCompletionRequestDtoResult));
}
exports.lmsCreateCompletionRequestDtoResultToJSON = lmsCreateCompletionRequestDtoResultToJSON;
function lmsCreateCompletionRequestDtoResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsCreateCompletionRequestDtoResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsCreateCompletionRequestDtoResult' from JSON`);
}
exports.lmsCreateCompletionRequestDtoResultFromJSON = lmsCreateCompletionRequestDtoResultFromJSON;
/** @internal */
exports.LmsCreateCompletionRequestDto$inboundSchema = z.object({
    completed_at: z.nullable(z.string()).optional(),
    content_external_reference: z.nullable(z.string()).optional(),
    content_id: z.nullable(z.string()).optional(),
    learning_object_external_reference: z.nullable(z.string()).optional(),
    learning_object_id: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    result: z.nullable(z.lazy(() => exports.LmsCreateCompletionRequestDtoResult$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "completed_at": "completedAt",
        "content_external_reference": "contentExternalReference",
        "content_id": "contentId",
        "learning_object_external_reference": "learningObjectExternalReference",
        "learning_object_id": "learningObjectId",
    });
});
/** @internal */
exports.LmsCreateCompletionRequestDto$outboundSchema = z.object({
    completedAt: z.nullable(z.string()).optional(),
    contentExternalReference: z.nullable(z.string()).optional(),
    contentId: z.nullable(z.string()).optional(),
    learningObjectExternalReference: z.nullable(z.string()).optional(),
    learningObjectId: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    result: z.nullable(z.lazy(() => exports.LmsCreateCompletionRequestDtoResult$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        completedAt: "completed_at",
        contentExternalReference: "content_external_reference",
        contentId: "content_id",
        learningObjectExternalReference: "learning_object_external_reference",
        learningObjectId: "learning_object_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LmsCreateCompletionRequestDto$;
(function (LmsCreateCompletionRequestDto$) {
    /** @deprecated use `LmsCreateCompletionRequestDto$inboundSchema` instead. */
    LmsCreateCompletionRequestDto$.inboundSchema = exports.LmsCreateCompletionRequestDto$inboundSchema;
    /** @deprecated use `LmsCreateCompletionRequestDto$outboundSchema` instead. */
    LmsCreateCompletionRequestDto$.outboundSchema = exports.LmsCreateCompletionRequestDto$outboundSchema;
})(LmsCreateCompletionRequestDto$ || (exports.LmsCreateCompletionRequestDto$ = LmsCreateCompletionRequestDto$ = {}));
function lmsCreateCompletionRequestDtoToJSON(lmsCreateCompletionRequestDto) {
    return JSON.stringify(exports.LmsCreateCompletionRequestDto$outboundSchema.parse(lmsCreateCompletionRequestDto));
}
exports.lmsCreateCompletionRequestDtoToJSON = lmsCreateCompletionRequestDtoToJSON;
function lmsCreateCompletionRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LmsCreateCompletionRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LmsCreateCompletionRequestDto' from JSON`);
}
exports.lmsCreateCompletionRequestDtoFromJSON = lmsCreateCompletionRequestDtoFromJSON;
//# sourceMappingURL=lmscreatecompletionrequestdto.js.map