/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import * as components from "../components/index.js";
export const UpdateStudentItemResponseStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const UpdateStudentItemResponseScoreStatus = {
    Exempt: "exempt",
    FullyGraded: "fully graded",
    NotSubmitted: "not submitted",
    PartiallyGraded: "partially graded",
    Submitted: "submitted",
};
/** @internal */
export const UpdateStudentItemResponseStatus$inboundSchema = z.nativeEnum(UpdateStudentItemResponseStatus);
/** @internal */
export const UpdateStudentItemResponseStatus$outboundSchema = UpdateStudentItemResponseStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateStudentItemResponseStatus$;
(function (UpdateStudentItemResponseStatus$) {
    /** @deprecated use `UpdateStudentItemResponseStatus$inboundSchema` instead. */
    UpdateStudentItemResponseStatus$.inboundSchema = UpdateStudentItemResponseStatus$inboundSchema;
    /** @deprecated use `UpdateStudentItemResponseStatus$outboundSchema` instead. */
    UpdateStudentItemResponseStatus$.outboundSchema = UpdateStudentItemResponseStatus$outboundSchema;
})(UpdateStudentItemResponseStatus$ || (UpdateStudentItemResponseStatus$ = {}));
/** @internal */
export const UpdateStudentItemResponseScoreStatus$inboundSchema = z.nativeEnum(UpdateStudentItemResponseScoreStatus);
/** @internal */
export const UpdateStudentItemResponseScoreStatus$outboundSchema = UpdateStudentItemResponseScoreStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateStudentItemResponseScoreStatus$;
(function (UpdateStudentItemResponseScoreStatus$) {
    /** @deprecated use `UpdateStudentItemResponseScoreStatus$inboundSchema` instead. */
    UpdateStudentItemResponseScoreStatus$.inboundSchema = UpdateStudentItemResponseScoreStatus$inboundSchema;
    /** @deprecated use `UpdateStudentItemResponseScoreStatus$outboundSchema` instead. */
    UpdateStudentItemResponseScoreStatus$.outboundSchema = UpdateStudentItemResponseScoreStatus$outboundSchema;
})(UpdateStudentItemResponseScoreStatus$ || (UpdateStudentItemResponseScoreStatus$ = {}));
/** @internal */
export const UpdateStudentItemResponseLearningObjectiveResult$inboundSchema = z.object({
    learningObjectiveId: z.string(),
    score: z.number().optional(),
    textScore: z.string().optional(),
});
/** @internal */
export const UpdateStudentItemResponseLearningObjectiveResult$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 UpdateStudentItemResponseLearningObjectiveResult$;
(function (UpdateStudentItemResponseLearningObjectiveResult$) {
    /** @deprecated use `UpdateStudentItemResponseLearningObjectiveResult$inboundSchema` instead. */
    UpdateStudentItemResponseLearningObjectiveResult$.inboundSchema = UpdateStudentItemResponseLearningObjectiveResult$inboundSchema;
    /** @deprecated use `UpdateStudentItemResponseLearningObjectiveResult$outboundSchema` instead. */
    UpdateStudentItemResponseLearningObjectiveResult$.outboundSchema = UpdateStudentItemResponseLearningObjectiveResult$outboundSchema;
})(UpdateStudentItemResponseLearningObjectiveResult$ || (UpdateStudentItemResponseLearningObjectiveResult$ = {}));
export function updateStudentItemResponseLearningObjectiveResultToJSON(updateStudentItemResponseLearningObjectiveResult) {
    return JSON.stringify(UpdateStudentItemResponseLearningObjectiveResult$outboundSchema.parse(updateStudentItemResponseLearningObjectiveResult));
}
export function updateStudentItemResponseLearningObjectiveResultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateStudentItemResponseLearningObjectiveResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateStudentItemResponseLearningObjectiveResult' from JSON`);
}
/** @internal */
export const UpdateStudentItemResponseLearningObjectiveSet$inboundSchema = z.object({
    source: z.string(),
    learningObjectiveResults: z.array(z.lazy(() => UpdateStudentItemResponseLearningObjectiveResult$inboundSchema)),
});
/** @internal */
export const UpdateStudentItemResponseLearningObjectiveSet$outboundSchema = z.object({
    source: z.string(),
    learningObjectiveResults: z.array(z.lazy(() => UpdateStudentItemResponseLearningObjectiveResult$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateStudentItemResponseLearningObjectiveSet$;
(function (UpdateStudentItemResponseLearningObjectiveSet$) {
    /** @deprecated use `UpdateStudentItemResponseLearningObjectiveSet$inboundSchema` instead. */
    UpdateStudentItemResponseLearningObjectiveSet$.inboundSchema = UpdateStudentItemResponseLearningObjectiveSet$inboundSchema;
    /** @deprecated use `UpdateStudentItemResponseLearningObjectiveSet$outboundSchema` instead. */
    UpdateStudentItemResponseLearningObjectiveSet$.outboundSchema = UpdateStudentItemResponseLearningObjectiveSet$outboundSchema;
})(UpdateStudentItemResponseLearningObjectiveSet$ || (UpdateStudentItemResponseLearningObjectiveSet$ = {}));
export function updateStudentItemResponseLearningObjectiveSetToJSON(updateStudentItemResponseLearningObjectiveSet) {
    return JSON.stringify(UpdateStudentItemResponseLearningObjectiveSet$outboundSchema.parse(updateStudentItemResponseLearningObjectiveSet));
}
export function updateStudentItemResponseLearningObjectiveSetFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateStudentItemResponseLearningObjectiveSet$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateStudentItemResponseLearningObjectiveSet' from JSON`);
}
/** @internal */
export const UpdateStudentItemResponseResult$inboundSchema = z.object({
    status: UpdateStudentItemResponseStatus$inboundSchema,
    metadata: z.nullable(z.record(z.any())).optional(),
    score: z.nullable(z.number()).optional(),
    textScore: z.nullable(z.string()).optional(),
    scoreDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    scorePercentile: z.nullable(z.number()).optional(),
    scoreStatus: UpdateStudentItemResponseScoreStatus$inboundSchema,
    comment: z.nullable(z.string()).optional(),
    learningObjectiveSet: z.nullable(z.array(z.lazy(() => UpdateStudentItemResponseLearningObjectiveSet$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 UpdateStudentItemResponseResult$outboundSchema = z.object({
    status: UpdateStudentItemResponseStatus$outboundSchema,
    metadata: z.nullable(z.record(z.any())).optional(),
    score: z.nullable(z.number()).optional(),
    textScore: z.nullable(z.string()).optional(),
    scoreDate: z.date().transform(v => v.toISOString()),
    scorePercentile: z.nullable(z.number()).optional(),
    scoreStatus: UpdateStudentItemResponseScoreStatus$outboundSchema,
    comment: z.nullable(z.string()).optional(),
    learningObjectiveSet: z.nullable(z.array(z.lazy(() => UpdateStudentItemResponseLearningObjectiveSet$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 UpdateStudentItemResponseResult$;
(function (UpdateStudentItemResponseResult$) {
    /** @deprecated use `UpdateStudentItemResponseResult$inboundSchema` instead. */
    UpdateStudentItemResponseResult$.inboundSchema = UpdateStudentItemResponseResult$inboundSchema;
    /** @deprecated use `UpdateStudentItemResponseResult$outboundSchema` instead. */
    UpdateStudentItemResponseResult$.outboundSchema = UpdateStudentItemResponseResult$outboundSchema;
})(UpdateStudentItemResponseResult$ || (UpdateStudentItemResponseResult$ = {}));
export function updateStudentItemResponseResultToJSON(updateStudentItemResponseResult) {
    return JSON.stringify(UpdateStudentItemResponseResult$outboundSchema.parse(updateStudentItemResponseResult));
}
export function updateStudentItemResponseResultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateStudentItemResponseResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateStudentItemResponseResult' from JSON`);
}
/** @internal */
export const UpdateStudentItemResponseRequest$inboundSchema = z.object({
    studentId: z.string(),
    componentResourceId: z.string(),
    result: z.lazy(() => UpdateStudentItemResponseResult$inboundSchema),
});
/** @internal */
export const UpdateStudentItemResponseRequest$outboundSchema = z.object({
    studentId: z.string(),
    componentResourceId: z.string(),
    result: z.lazy(() => UpdateStudentItemResponseResult$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateStudentItemResponseRequest$;
(function (UpdateStudentItemResponseRequest$) {
    /** @deprecated use `UpdateStudentItemResponseRequest$inboundSchema` instead. */
    UpdateStudentItemResponseRequest$.inboundSchema = UpdateStudentItemResponseRequest$inboundSchema;
    /** @deprecated use `UpdateStudentItemResponseRequest$outboundSchema` instead. */
    UpdateStudentItemResponseRequest$.outboundSchema = UpdateStudentItemResponseRequest$outboundSchema;
})(UpdateStudentItemResponseRequest$ || (UpdateStudentItemResponseRequest$ = {}));
export function updateStudentItemResponseRequestToJSON(updateStudentItemResponseRequest) {
    return JSON.stringify(UpdateStudentItemResponseRequest$outboundSchema.parse(updateStudentItemResponseRequest));
}
export function updateStudentItemResponseRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateStudentItemResponseRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateStudentItemResponseRequest' from JSON`);
}
/** @internal */
export const UpdateStudentItemResponseResponse$inboundSchema = z.object({
    componentResourceLineItem: components.AssessmentLineItem$inboundSchema
        .optional(),
    componentResourceResult: components.AssessmentResult$inboundSchema.optional(),
});
/** @internal */
export const UpdateStudentItemResponseResponse$outboundSchema = z.object({
    componentResourceLineItem: components.AssessmentLineItem$outboundSchema
        .optional(),
    componentResourceResult: components.AssessmentResult$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 UpdateStudentItemResponseResponse$;
(function (UpdateStudentItemResponseResponse$) {
    /** @deprecated use `UpdateStudentItemResponseResponse$inboundSchema` instead. */
    UpdateStudentItemResponseResponse$.inboundSchema = UpdateStudentItemResponseResponse$inboundSchema;
    /** @deprecated use `UpdateStudentItemResponseResponse$outboundSchema` instead. */
    UpdateStudentItemResponseResponse$.outboundSchema = UpdateStudentItemResponseResponse$outboundSchema;
})(UpdateStudentItemResponseResponse$ || (UpdateStudentItemResponseResponse$ = {}));
export function updateStudentItemResponseResponseToJSON(updateStudentItemResponseResponse) {
    return JSON.stringify(UpdateStudentItemResponseResponse$outboundSchema.parse(updateStudentItemResponseResponse));
}
export function updateStudentItemResponseResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateStudentItemResponseResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateStudentItemResponseResponse' from JSON`);
}
//# sourceMappingURL=updatestudentitemresponse.js.map