"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.AssessmentLineItem$ = exports.AssessmentLineItem$outboundSchema = exports.AssessmentLineItem$inboundSchema = exports.ComponentResource$ = exports.ComponentResource$outboundSchema = exports.ComponentResource$inboundSchema = exports.Component$ = exports.Component$outboundSchema = exports.Component$inboundSchema = exports.AssessmentLineItemScoreScale$ = exports.AssessmentLineItemScoreScale$outboundSchema = exports.AssessmentLineItemScoreScale$inboundSchema = exports.AssessmentLineItemParent$ = exports.AssessmentLineItemParent$outboundSchema = exports.AssessmentLineItemParent$inboundSchema = exports.AssessmentLineItemClass$ = exports.AssessmentLineItemClass$outboundSchema = exports.AssessmentLineItemClass$inboundSchema = exports.AssessmentLineItemStatus$ = exports.AssessmentLineItemStatus$outboundSchema = exports.AssessmentLineItemStatus$inboundSchema = exports.AssessmentLineItemStatus = void 0;
exports.assessmentLineItemClassToJSON = assessmentLineItemClassToJSON;
exports.assessmentLineItemClassFromJSON = assessmentLineItemClassFromJSON;
exports.assessmentLineItemParentToJSON = assessmentLineItemParentToJSON;
exports.assessmentLineItemParentFromJSON = assessmentLineItemParentFromJSON;
exports.assessmentLineItemScoreScaleToJSON = assessmentLineItemScoreScaleToJSON;
exports.assessmentLineItemScoreScaleFromJSON = assessmentLineItemScoreScaleFromJSON;
exports.componentToJSON = componentToJSON;
exports.componentFromJSON = componentFromJSON;
exports.componentResourceToJSON = componentResourceToJSON;
exports.componentResourceFromJSON = componentResourceFromJSON;
exports.assessmentLineItemToJSON = assessmentLineItemToJSON;
exports.assessmentLineItemFromJSON = assessmentLineItemFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
const learningobjectiveset_js_1 = require("./learningobjectiveset.js");
exports.AssessmentLineItemStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.AssessmentLineItemStatus$inboundSchema = z.nativeEnum(exports.AssessmentLineItemStatus);
/** @internal */
exports.AssessmentLineItemStatus$outboundSchema = exports.AssessmentLineItemStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssessmentLineItemStatus$;
(function (AssessmentLineItemStatus$) {
    /** @deprecated use `AssessmentLineItemStatus$inboundSchema` instead. */
    AssessmentLineItemStatus$.inboundSchema = exports.AssessmentLineItemStatus$inboundSchema;
    /** @deprecated use `AssessmentLineItemStatus$outboundSchema` instead. */
    AssessmentLineItemStatus$.outboundSchema = exports.AssessmentLineItemStatus$outboundSchema;
})(AssessmentLineItemStatus$ || (exports.AssessmentLineItemStatus$ = AssessmentLineItemStatus$ = {}));
/** @internal */
exports.AssessmentLineItemClass$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.AssessmentLineItemClass$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssessmentLineItemClass$;
(function (AssessmentLineItemClass$) {
    /** @deprecated use `AssessmentLineItemClass$inboundSchema` instead. */
    AssessmentLineItemClass$.inboundSchema = exports.AssessmentLineItemClass$inboundSchema;
    /** @deprecated use `AssessmentLineItemClass$outboundSchema` instead. */
    AssessmentLineItemClass$.outboundSchema = exports.AssessmentLineItemClass$outboundSchema;
})(AssessmentLineItemClass$ || (exports.AssessmentLineItemClass$ = AssessmentLineItemClass$ = {}));
function assessmentLineItemClassToJSON(assessmentLineItemClass) {
    return JSON.stringify(exports.AssessmentLineItemClass$outboundSchema.parse(assessmentLineItemClass));
}
function assessmentLineItemClassFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssessmentLineItemClass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemClass' from JSON`);
}
/** @internal */
exports.AssessmentLineItemParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.AssessmentLineItemParent$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssessmentLineItemParent$;
(function (AssessmentLineItemParent$) {
    /** @deprecated use `AssessmentLineItemParent$inboundSchema` instead. */
    AssessmentLineItemParent$.inboundSchema = exports.AssessmentLineItemParent$inboundSchema;
    /** @deprecated use `AssessmentLineItemParent$outboundSchema` instead. */
    AssessmentLineItemParent$.outboundSchema = exports.AssessmentLineItemParent$outboundSchema;
})(AssessmentLineItemParent$ || (exports.AssessmentLineItemParent$ = AssessmentLineItemParent$ = {}));
function assessmentLineItemParentToJSON(assessmentLineItemParent) {
    return JSON.stringify(exports.AssessmentLineItemParent$outboundSchema.parse(assessmentLineItemParent));
}
function assessmentLineItemParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssessmentLineItemParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemParent' from JSON`);
}
/** @internal */
exports.AssessmentLineItemScoreScale$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.AssessmentLineItemScoreScale$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssessmentLineItemScoreScale$;
(function (AssessmentLineItemScoreScale$) {
    /** @deprecated use `AssessmentLineItemScoreScale$inboundSchema` instead. */
    AssessmentLineItemScoreScale$.inboundSchema = exports.AssessmentLineItemScoreScale$inboundSchema;
    /** @deprecated use `AssessmentLineItemScoreScale$outboundSchema` instead. */
    AssessmentLineItemScoreScale$.outboundSchema = exports.AssessmentLineItemScoreScale$outboundSchema;
})(AssessmentLineItemScoreScale$ || (exports.AssessmentLineItemScoreScale$ = AssessmentLineItemScoreScale$ = {}));
function assessmentLineItemScoreScaleToJSON(assessmentLineItemScoreScale) {
    return JSON.stringify(exports.AssessmentLineItemScoreScale$outboundSchema.parse(assessmentLineItemScoreScale));
}
function assessmentLineItemScoreScaleFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssessmentLineItemScoreScale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemScoreScale' from JSON`);
}
/** @internal */
exports.Component$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.Component$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Component$;
(function (Component$) {
    /** @deprecated use `Component$inboundSchema` instead. */
    Component$.inboundSchema = exports.Component$inboundSchema;
    /** @deprecated use `Component$outboundSchema` instead. */
    Component$.outboundSchema = exports.Component$outboundSchema;
})(Component$ || (exports.Component$ = Component$ = {}));
function componentToJSON(component) {
    return JSON.stringify(exports.Component$outboundSchema.parse(component));
}
function componentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Component$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Component' from JSON`);
}
/** @internal */
exports.ComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.ComponentResource$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ComponentResource$;
(function (ComponentResource$) {
    /** @deprecated use `ComponentResource$inboundSchema` instead. */
    ComponentResource$.inboundSchema = exports.ComponentResource$inboundSchema;
    /** @deprecated use `ComponentResource$outboundSchema` instead. */
    ComponentResource$.outboundSchema = exports.ComponentResource$outboundSchema;
})(ComponentResource$ || (exports.ComponentResource$ = ComponentResource$ = {}));
function componentResourceToJSON(componentResource) {
    return JSON.stringify(exports.ComponentResource$outboundSchema.parse(componentResource));
}
function componentResourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ComponentResource' from JSON`);
}
/** @internal */
exports.AssessmentLineItem$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.AssessmentLineItemStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    description: z.nullable(z.string()).optional(),
    class: z.nullable(z.lazy(() => exports.AssessmentLineItemClass$inboundSchema))
        .optional(),
    parent: z.nullable(z.lazy(() => exports.AssessmentLineItemParent$inboundSchema))
        .optional(),
    scoreScale: z.nullable(z.lazy(() => exports.AssessmentLineItemScoreScale$inboundSchema)).optional(),
    resultValueMin: z.nullable(z.number()).optional(),
    resultValueMax: z.nullable(z.number()).optional(),
    component: z.nullable(z.lazy(() => exports.Component$inboundSchema)).optional(),
    componentResource: z.nullable(z.lazy(() => exports.ComponentResource$inboundSchema))
        .optional(),
    learningObjectiveSet: z.nullable(z.array(learningobjectiveset_js_1.LearningObjectiveSet$inboundSchema))
        .optional(),
});
/** @internal */
exports.AssessmentLineItem$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.AssessmentLineItemStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    description: z.nullable(z.string()).optional(),
    class: z.nullable(z.lazy(() => exports.AssessmentLineItemClass$outboundSchema))
        .optional(),
    parent: z.nullable(z.lazy(() => exports.AssessmentLineItemParent$outboundSchema))
        .optional(),
    scoreScale: z.nullable(z.lazy(() => exports.AssessmentLineItemScoreScale$outboundSchema)).optional(),
    resultValueMin: z.nullable(z.number()).optional(),
    resultValueMax: z.nullable(z.number()).optional(),
    component: z.nullable(z.lazy(() => exports.Component$outboundSchema)).optional(),
    componentResource: z.nullable(z.lazy(() => exports.ComponentResource$outboundSchema))
        .optional(),
    learningObjectiveSet: z.nullable(z.array(learningobjectiveset_js_1.LearningObjectiveSet$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssessmentLineItem$;
(function (AssessmentLineItem$) {
    /** @deprecated use `AssessmentLineItem$inboundSchema` instead. */
    AssessmentLineItem$.inboundSchema = exports.AssessmentLineItem$inboundSchema;
    /** @deprecated use `AssessmentLineItem$outboundSchema` instead. */
    AssessmentLineItem$.outboundSchema = exports.AssessmentLineItem$outboundSchema;
})(AssessmentLineItem$ || (exports.AssessmentLineItem$ = AssessmentLineItem$ = {}));
function assessmentLineItemToJSON(assessmentLineItem) {
    return JSON.stringify(exports.AssessmentLineItem$outboundSchema.parse(assessmentLineItem));
}
function assessmentLineItemFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssessmentLineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItem' from JSON`);
}
//# sourceMappingURL=assessmentlineitem.js.map