/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const AssessmentResultStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const AssessmentResultScoreStatus = {
    Exempt: "exempt",
    FullyGraded: "fully graded",
    NotSubmitted: "not submitted",
    PartiallyGraded: "partially graded",
    Submitted: "submitted",
};
/** @internal */
export const AssessmentResultStatus$inboundSchema = z.nativeEnum(AssessmentResultStatus);
/** @internal */
export const AssessmentResultStatus$outboundSchema = AssessmentResultStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AssessmentResultStatus$;
(function (AssessmentResultStatus$) {
    /** @deprecated use `AssessmentResultStatus$inboundSchema` instead. */
    AssessmentResultStatus$.inboundSchema = AssessmentResultStatus$inboundSchema;
    /** @deprecated use `AssessmentResultStatus$outboundSchema` instead. */
    AssessmentResultStatus$.outboundSchema = AssessmentResultStatus$outboundSchema;
})(AssessmentResultStatus$ || (AssessmentResultStatus$ = {}));
/** @internal */
export const AssessmentResultAssessmentLineItem$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const AssessmentResultAssessmentLineItem$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 AssessmentResultAssessmentLineItem$;
(function (AssessmentResultAssessmentLineItem$) {
    /** @deprecated use `AssessmentResultAssessmentLineItem$inboundSchema` instead. */
    AssessmentResultAssessmentLineItem$.inboundSchema = AssessmentResultAssessmentLineItem$inboundSchema;
    /** @deprecated use `AssessmentResultAssessmentLineItem$outboundSchema` instead. */
    AssessmentResultAssessmentLineItem$.outboundSchema = AssessmentResultAssessmentLineItem$outboundSchema;
})(AssessmentResultAssessmentLineItem$ || (AssessmentResultAssessmentLineItem$ = {}));
export function assessmentResultAssessmentLineItemToJSON(assessmentResultAssessmentLineItem) {
    return JSON.stringify(AssessmentResultAssessmentLineItem$outboundSchema.parse(assessmentResultAssessmentLineItem));
}
export function assessmentResultAssessmentLineItemFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentResultAssessmentLineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentResultAssessmentLineItem' from JSON`);
}
/** @internal */
export const AssessmentResultStudent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const AssessmentResultStudent$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 AssessmentResultStudent$;
(function (AssessmentResultStudent$) {
    /** @deprecated use `AssessmentResultStudent$inboundSchema` instead. */
    AssessmentResultStudent$.inboundSchema = AssessmentResultStudent$inboundSchema;
    /** @deprecated use `AssessmentResultStudent$outboundSchema` instead. */
    AssessmentResultStudent$.outboundSchema = AssessmentResultStudent$outboundSchema;
})(AssessmentResultStudent$ || (AssessmentResultStudent$ = {}));
export function assessmentResultStudentToJSON(assessmentResultStudent) {
    return JSON.stringify(AssessmentResultStudent$outboundSchema.parse(assessmentResultStudent));
}
export function assessmentResultStudentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentResultStudent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentResultStudent' from JSON`);
}
/** @internal */
export const AssessmentResultScoreScale$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const AssessmentResultScoreScale$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 AssessmentResultScoreScale$;
(function (AssessmentResultScoreScale$) {
    /** @deprecated use `AssessmentResultScoreScale$inboundSchema` instead. */
    AssessmentResultScoreScale$.inboundSchema = AssessmentResultScoreScale$inboundSchema;
    /** @deprecated use `AssessmentResultScoreScale$outboundSchema` instead. */
    AssessmentResultScoreScale$.outboundSchema = AssessmentResultScoreScale$outboundSchema;
})(AssessmentResultScoreScale$ || (AssessmentResultScoreScale$ = {}));
export function assessmentResultScoreScaleToJSON(assessmentResultScoreScale) {
    return JSON.stringify(AssessmentResultScoreScale$outboundSchema.parse(assessmentResultScoreScale));
}
export function assessmentResultScoreScaleFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentResultScoreScale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentResultScoreScale' from JSON`);
}
/** @internal */
export const AssessmentResultScoreStatus$inboundSchema = z.nativeEnum(AssessmentResultScoreStatus);
/** @internal */
export const AssessmentResultScoreStatus$outboundSchema = AssessmentResultScoreStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AssessmentResultScoreStatus$;
(function (AssessmentResultScoreStatus$) {
    /** @deprecated use `AssessmentResultScoreStatus$inboundSchema` instead. */
    AssessmentResultScoreStatus$.inboundSchema = AssessmentResultScoreStatus$inboundSchema;
    /** @deprecated use `AssessmentResultScoreStatus$outboundSchema` instead. */
    AssessmentResultScoreStatus$.outboundSchema = AssessmentResultScoreStatus$outboundSchema;
})(AssessmentResultScoreStatus$ || (AssessmentResultScoreStatus$ = {}));
/** @internal */
export const AssessmentResultLearningObjectiveId$inboundSchema = z.object({
    learningObjectiveId: z.string(),
    score: z.number().optional(),
    textScore: z.string().optional(),
});
/** @internal */
export const AssessmentResultLearningObjectiveId$outboundSchema = z.object({
    learningObjectiveId: z.string(),
    score: z.number().optional(),
    textScore: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AssessmentResultLearningObjectiveId$;
(function (AssessmentResultLearningObjectiveId$) {
    /** @deprecated use `AssessmentResultLearningObjectiveId$inboundSchema` instead. */
    AssessmentResultLearningObjectiveId$.inboundSchema = AssessmentResultLearningObjectiveId$inboundSchema;
    /** @deprecated use `AssessmentResultLearningObjectiveId$outboundSchema` instead. */
    AssessmentResultLearningObjectiveId$.outboundSchema = AssessmentResultLearningObjectiveId$outboundSchema;
})(AssessmentResultLearningObjectiveId$ || (AssessmentResultLearningObjectiveId$ = {}));
export function assessmentResultLearningObjectiveIdToJSON(assessmentResultLearningObjectiveId) {
    return JSON.stringify(AssessmentResultLearningObjectiveId$outboundSchema.parse(assessmentResultLearningObjectiveId));
}
export function assessmentResultLearningObjectiveIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentResultLearningObjectiveId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentResultLearningObjectiveId' from JSON`);
}
/** @internal */
export const AssessmentResultLearningObjectiveSet$inboundSchema = z.object({
    source: z.string(),
    learningObjectiveIds: z.array(z.lazy(() => AssessmentResultLearningObjectiveId$inboundSchema)),
});
/** @internal */
export const AssessmentResultLearningObjectiveSet$outboundSchema = z.object({
    source: z.string(),
    learningObjectiveIds: z.array(z.lazy(() => AssessmentResultLearningObjectiveId$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AssessmentResultLearningObjectiveSet$;
(function (AssessmentResultLearningObjectiveSet$) {
    /** @deprecated use `AssessmentResultLearningObjectiveSet$inboundSchema` instead. */
    AssessmentResultLearningObjectiveSet$.inboundSchema = AssessmentResultLearningObjectiveSet$inboundSchema;
    /** @deprecated use `AssessmentResultLearningObjectiveSet$outboundSchema` instead. */
    AssessmentResultLearningObjectiveSet$.outboundSchema = AssessmentResultLearningObjectiveSet$outboundSchema;
})(AssessmentResultLearningObjectiveSet$ || (AssessmentResultLearningObjectiveSet$ = {}));
export function assessmentResultLearningObjectiveSetToJSON(assessmentResultLearningObjectiveSet) {
    return JSON.stringify(AssessmentResultLearningObjectiveSet$outboundSchema.parse(assessmentResultLearningObjectiveSet));
}
export function assessmentResultLearningObjectiveSetFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentResultLearningObjectiveSet$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentResultLearningObjectiveSet' from JSON`);
}
/** @internal */
export const AssessmentResult$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: AssessmentResultStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    assessmentLineItem: z.lazy(() => AssessmentResultAssessmentLineItem$inboundSchema),
    student: z.lazy(() => AssessmentResultStudent$inboundSchema),
    score: z.nullable(z.number()).optional(),
    textScore: z.nullable(z.string()).optional(),
    scoreDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    scoreScale: z.nullable(z.lazy(() => AssessmentResultScoreScale$inboundSchema))
        .optional(),
    scorePercentile: z.nullable(z.number()).optional(),
    scoreStatus: AssessmentResultScoreStatus$inboundSchema,
    comment: z.nullable(z.string()).optional(),
    learningObjectiveSet: z.nullable(z.array(z.lazy(() => AssessmentResultLearningObjectiveSet$inboundSchema))).optional(),
    inProgress: z.nullable(z.string()).optional(),
    incomplete: z.nullable(z.string()).optional(),
    late: z.nullable(z.string()).optional(),
    missing: z.nullable(z.string()).optional(),
});
/** @internal */
export const AssessmentResult$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: AssessmentResultStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    assessmentLineItem: z.lazy(() => AssessmentResultAssessmentLineItem$outboundSchema),
    student: z.lazy(() => AssessmentResultStudent$outboundSchema),
    score: z.nullable(z.number()).optional(),
    textScore: z.nullable(z.string()).optional(),
    scoreDate: z.date().transform(v => v.toISOString()),
    scoreScale: z.nullable(z.lazy(() => AssessmentResultScoreScale$outboundSchema)).optional(),
    scorePercentile: z.nullable(z.number()).optional(),
    scoreStatus: AssessmentResultScoreStatus$outboundSchema,
    comment: z.nullable(z.string()).optional(),
    learningObjectiveSet: z.nullable(z.array(z.lazy(() => AssessmentResultLearningObjectiveSet$outboundSchema))).optional(),
    inProgress: z.nullable(z.string()).optional(),
    incomplete: z.nullable(z.string()).optional(),
    late: z.nullable(z.string()).optional(),
    missing: z.nullable(z.string()).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AssessmentResult$;
(function (AssessmentResult$) {
    /** @deprecated use `AssessmentResult$inboundSchema` instead. */
    AssessmentResult$.inboundSchema = AssessmentResult$inboundSchema;
    /** @deprecated use `AssessmentResult$outboundSchema` instead. */
    AssessmentResult$.outboundSchema = AssessmentResult$outboundSchema;
})(AssessmentResult$ || (AssessmentResult$ = {}));
export function assessmentResultToJSON(assessmentResult) {
    return JSON.stringify(AssessmentResult$outboundSchema.parse(assessmentResult));
}
export function assessmentResultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssessmentResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentResult' from JSON`);
}
//# sourceMappingURL=assessmentresult.js.map