/*
 * 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 Class$inboundSchema = z
    .object({
    sourcedId: z.string(),
});
/** @internal */
export const Class$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 Class$;
(function (Class$) {
    /** @deprecated use `Class$inboundSchema` instead. */
    Class$.inboundSchema = Class$inboundSchema;
    /** @deprecated use `Class$outboundSchema` instead. */
    Class$.outboundSchema = Class$outboundSchema;
})(Class$ || (Class$ = {}));
export function classToJSON(value) {
    return JSON.stringify(Class$outboundSchema.parse(value));
}
export function classFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Class$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Class' from JSON`);
}
/** @internal */
export const ParentAssessmentLineItem$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const ParentAssessmentLineItem$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 ParentAssessmentLineItem$;
(function (ParentAssessmentLineItem$) {
    /** @deprecated use `ParentAssessmentLineItem$inboundSchema` instead. */
    ParentAssessmentLineItem$.inboundSchema = ParentAssessmentLineItem$inboundSchema;
    /** @deprecated use `ParentAssessmentLineItem$outboundSchema` instead. */
    ParentAssessmentLineItem$.outboundSchema = ParentAssessmentLineItem$outboundSchema;
})(ParentAssessmentLineItem$ || (ParentAssessmentLineItem$ = {}));
export function parentAssessmentLineItemToJSON(parentAssessmentLineItem) {
    return JSON.stringify(ParentAssessmentLineItem$outboundSchema.parse(parentAssessmentLineItem));
}
export function parentAssessmentLineItemFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ParentAssessmentLineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ParentAssessmentLineItem' 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 AssessmentLineItemComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const AssessmentLineItemComponentResource$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 AssessmentLineItemComponentResource$;
(function (AssessmentLineItemComponentResource$) {
    /** @deprecated use `AssessmentLineItemComponentResource$inboundSchema` instead. */
    AssessmentLineItemComponentResource$.inboundSchema = AssessmentLineItemComponentResource$inboundSchema;
    /** @deprecated use `AssessmentLineItemComponentResource$outboundSchema` instead. */
    AssessmentLineItemComponentResource$.outboundSchema = AssessmentLineItemComponentResource$outboundSchema;
})(AssessmentLineItemComponentResource$ || (AssessmentLineItemComponentResource$ = {}));
export function assessmentLineItemComponentResourceToJSON(assessmentLineItemComponentResource) {
    return JSON.stringify(AssessmentLineItemComponentResource$outboundSchema.parse(assessmentLineItemComponentResource));
}
export function assessmentLineItemComponentResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentLineItemComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemComponentResource' 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(() => Class$inboundSchema)).optional(),
    parentAssessmentLineItem: z.nullable(z.lazy(() => ParentAssessmentLineItem$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(() => AssessmentLineItemComponentResource$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(() => Class$outboundSchema)).optional(),
    parentAssessmentLineItem: z.nullable(z.lazy(() => ParentAssessmentLineItem$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(() => AssessmentLineItemComponentResource$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