/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { LearningObjectiveSet$inboundSchema, LearningObjectiveSet$outboundSchema, } from "./learningobjectiveset.js";
export const AssessmentLineItemStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const AssessmentLineItemStatus$inboundSchema = z.nativeEnum(AssessmentLineItemStatus);
/** @internal */
export const AssessmentLineItemStatus$outboundSchema = AssessmentLineItemStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AssessmentLineItemStatus$;
(function (AssessmentLineItemStatus$) {
    /** @deprecated use `AssessmentLineItemStatus$inboundSchema` instead. */
    AssessmentLineItemStatus$.inboundSchema = AssessmentLineItemStatus$inboundSchema;
    /** @deprecated use `AssessmentLineItemStatus$outboundSchema` instead. */
    AssessmentLineItemStatus$.outboundSchema = AssessmentLineItemStatus$outboundSchema;
})(AssessmentLineItemStatus$ || (AssessmentLineItemStatus$ = {}));
/** @internal */
export const AssessmentLineItemClass$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const 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.
 */
export var AssessmentLineItemClass$;
(function (AssessmentLineItemClass$) {
    /** @deprecated use `AssessmentLineItemClass$inboundSchema` instead. */
    AssessmentLineItemClass$.inboundSchema = AssessmentLineItemClass$inboundSchema;
    /** @deprecated use `AssessmentLineItemClass$outboundSchema` instead. */
    AssessmentLineItemClass$.outboundSchema = AssessmentLineItemClass$outboundSchema;
})(AssessmentLineItemClass$ || (AssessmentLineItemClass$ = {}));
export function assessmentLineItemClassToJSON(assessmentLineItemClass) {
    return JSON.stringify(AssessmentLineItemClass$outboundSchema.parse(assessmentLineItemClass));
}
export function assessmentLineItemClassFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentLineItemClass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemClass' from JSON`);
}
/** @internal */
export const AssessmentLineItemParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const 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.
 */
export var AssessmentLineItemParent$;
(function (AssessmentLineItemParent$) {
    /** @deprecated use `AssessmentLineItemParent$inboundSchema` instead. */
    AssessmentLineItemParent$.inboundSchema = AssessmentLineItemParent$inboundSchema;
    /** @deprecated use `AssessmentLineItemParent$outboundSchema` instead. */
    AssessmentLineItemParent$.outboundSchema = AssessmentLineItemParent$outboundSchema;
})(AssessmentLineItemParent$ || (AssessmentLineItemParent$ = {}));
export function assessmentLineItemParentToJSON(assessmentLineItemParent) {
    return JSON.stringify(AssessmentLineItemParent$outboundSchema.parse(assessmentLineItemParent));
}
export function assessmentLineItemParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentLineItemParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemParent' from JSON`);
}
/** @internal */
export const AssessmentLineItemScoreScale$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const 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.
 */
export var AssessmentLineItemScoreScale$;
(function (AssessmentLineItemScoreScale$) {
    /** @deprecated use `AssessmentLineItemScoreScale$inboundSchema` instead. */
    AssessmentLineItemScoreScale$.inboundSchema = AssessmentLineItemScoreScale$inboundSchema;
    /** @deprecated use `AssessmentLineItemScoreScale$outboundSchema` instead. */
    AssessmentLineItemScoreScale$.outboundSchema = AssessmentLineItemScoreScale$outboundSchema;
})(AssessmentLineItemScoreScale$ || (AssessmentLineItemScoreScale$ = {}));
export function assessmentLineItemScoreScaleToJSON(assessmentLineItemScoreScale) {
    return JSON.stringify(AssessmentLineItemScoreScale$outboundSchema.parse(assessmentLineItemScoreScale));
}
export function assessmentLineItemScoreScaleFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentLineItemScoreScale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemScoreScale' from JSON`);
}
/** @internal */
export const Component$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const 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.
 */
export var Component$;
(function (Component$) {
    /** @deprecated use `Component$inboundSchema` instead. */
    Component$.inboundSchema = Component$inboundSchema;
    /** @deprecated use `Component$outboundSchema` instead. */
    Component$.outboundSchema = Component$outboundSchema;
})(Component$ || (Component$ = {}));
export function componentToJSON(component) {
    return JSON.stringify(Component$outboundSchema.parse(component));
}
export function componentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Component$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Component' from JSON`);
}
/** @internal */
export const ComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const 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.
 */
export var ComponentResource$;
(function (ComponentResource$) {
    /** @deprecated use `ComponentResource$inboundSchema` instead. */
    ComponentResource$.inboundSchema = ComponentResource$inboundSchema;
    /** @deprecated use `ComponentResource$outboundSchema` instead. */
    ComponentResource$.outboundSchema = ComponentResource$outboundSchema;
})(ComponentResource$ || (ComponentResource$ = {}));
export function componentResourceToJSON(componentResource) {
    return JSON.stringify(ComponentResource$outboundSchema.parse(componentResource));
}
export function componentResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ComponentResource' from JSON`);
}
/** @internal */
export const AssessmentLineItem$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: 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(() => AssessmentLineItemClass$inboundSchema))
        .optional(),
    parent: z.nullable(z.lazy(() => AssessmentLineItemParent$inboundSchema))
        .optional(),
    scoreScale: z.nullable(z.lazy(() => AssessmentLineItemScoreScale$inboundSchema)).optional(),
    resultValueMin: z.nullable(z.number()).optional(),
    resultValueMax: z.nullable(z.number()).optional(),
    component: z.nullable(z.lazy(() => Component$inboundSchema)).optional(),
    componentResource: z.nullable(z.lazy(() => ComponentResource$inboundSchema))
        .optional(),
    learningObjectiveSet: z.nullable(z.array(LearningObjectiveSet$inboundSchema))
        .optional(),
});
/** @internal */
export const AssessmentLineItem$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: 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(() => AssessmentLineItemClass$outboundSchema))
        .optional(),
    parent: z.nullable(z.lazy(() => AssessmentLineItemParent$outboundSchema))
        .optional(),
    scoreScale: z.nullable(z.lazy(() => AssessmentLineItemScoreScale$outboundSchema)).optional(),
    resultValueMin: z.nullable(z.number()).optional(),
    resultValueMax: z.nullable(z.number()).optional(),
    component: z.nullable(z.lazy(() => Component$outboundSchema)).optional(),
    componentResource: z.nullable(z.lazy(() => ComponentResource$outboundSchema))
        .optional(),
    learningObjectiveSet: z.nullable(z.array(LearningObjectiveSet$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AssessmentLineItem$;
(function (AssessmentLineItem$) {
    /** @deprecated use `AssessmentLineItem$inboundSchema` instead. */
    AssessmentLineItem$.inboundSchema = AssessmentLineItem$inboundSchema;
    /** @deprecated use `AssessmentLineItem$outboundSchema` instead. */
    AssessmentLineItem$.outboundSchema = AssessmentLineItem$outboundSchema;
})(AssessmentLineItem$ || (AssessmentLineItem$ = {}));
export function assessmentLineItemToJSON(assessmentLineItem) {
    return JSON.stringify(AssessmentLineItem$outboundSchema.parse(assessmentLineItem));
}
export function assessmentLineItemFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentLineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItem' from JSON`);
}
//# sourceMappingURL=assessmentlineitem.js.map