/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const ImportExternalTestAssignmentResultsLessonType = {
    TestOut: "test-out",
    Placement: "placement",
};
/** @internal */
export const ImportExternalTestAssignmentResultsRequest$inboundSchema = z.object({
    student: z.string(),
    lesson: z.string(),
    applicationName: z.string().optional(),
});
/** @internal */
export const ImportExternalTestAssignmentResultsRequest$outboundSchema = z.object({
    student: z.string(),
    lesson: z.string(),
    applicationName: 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 ImportExternalTestAssignmentResultsRequest$;
(function (ImportExternalTestAssignmentResultsRequest$) {
    /** @deprecated use `ImportExternalTestAssignmentResultsRequest$inboundSchema` instead. */
    ImportExternalTestAssignmentResultsRequest$.inboundSchema = ImportExternalTestAssignmentResultsRequest$inboundSchema;
    /** @deprecated use `ImportExternalTestAssignmentResultsRequest$outboundSchema` instead. */
    ImportExternalTestAssignmentResultsRequest$.outboundSchema = ImportExternalTestAssignmentResultsRequest$outboundSchema;
})(ImportExternalTestAssignmentResultsRequest$ || (ImportExternalTestAssignmentResultsRequest$ = {}));
export function importExternalTestAssignmentResultsRequestToJSON(importExternalTestAssignmentResultsRequest) {
    return JSON.stringify(ImportExternalTestAssignmentResultsRequest$outboundSchema.parse(importExternalTestAssignmentResultsRequest));
}
export function importExternalTestAssignmentResultsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ImportExternalTestAssignmentResultsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportExternalTestAssignmentResultsRequest' from JSON`);
}
/** @internal */
export const ImportExternalTestAssignmentResultsLessonType$inboundSchema = z
    .nativeEnum(ImportExternalTestAssignmentResultsLessonType);
/** @internal */
export const ImportExternalTestAssignmentResultsLessonType$outboundSchema = ImportExternalTestAssignmentResultsLessonType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ImportExternalTestAssignmentResultsLessonType$;
(function (ImportExternalTestAssignmentResultsLessonType$) {
    /** @deprecated use `ImportExternalTestAssignmentResultsLessonType$inboundSchema` instead. */
    ImportExternalTestAssignmentResultsLessonType$.inboundSchema = ImportExternalTestAssignmentResultsLessonType$inboundSchema;
    /** @deprecated use `ImportExternalTestAssignmentResultsLessonType$outboundSchema` instead. */
    ImportExternalTestAssignmentResultsLessonType$.outboundSchema = ImportExternalTestAssignmentResultsLessonType$outboundSchema;
})(ImportExternalTestAssignmentResultsLessonType$ || (ImportExternalTestAssignmentResultsLessonType$ = {}));
/** @internal */
export const ImportExternalTestAssignmentResultsCredentials$inboundSchema = z.object({
    email: z.string(),
    password: z.string(),
});
/** @internal */
export const ImportExternalTestAssignmentResultsCredentials$outboundSchema = z.object({
    email: z.string(),
    password: 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 ImportExternalTestAssignmentResultsCredentials$;
(function (ImportExternalTestAssignmentResultsCredentials$) {
    /** @deprecated use `ImportExternalTestAssignmentResultsCredentials$inboundSchema` instead. */
    ImportExternalTestAssignmentResultsCredentials$.inboundSchema = ImportExternalTestAssignmentResultsCredentials$inboundSchema;
    /** @deprecated use `ImportExternalTestAssignmentResultsCredentials$outboundSchema` instead. */
    ImportExternalTestAssignmentResultsCredentials$.outboundSchema = ImportExternalTestAssignmentResultsCredentials$outboundSchema;
})(ImportExternalTestAssignmentResultsCredentials$ || (ImportExternalTestAssignmentResultsCredentials$ = {}));
export function importExternalTestAssignmentResultsCredentialsToJSON(importExternalTestAssignmentResultsCredentials) {
    return JSON.stringify(ImportExternalTestAssignmentResultsCredentials$outboundSchema.parse(importExternalTestAssignmentResultsCredentials));
}
export function importExternalTestAssignmentResultsCredentialsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ImportExternalTestAssignmentResultsCredentials$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportExternalTestAssignmentResultsCredentials' from JSON`);
}
/** @internal */
export const ImportExternalTestAssignmentResultsResponse$inboundSchema = z.object({
    lessonType: ImportExternalTestAssignmentResultsLessonType$inboundSchema,
    lessonId: z.nullable(z.string()),
    toolProvider: z.string(),
    finalized: z.boolean(),
    attempt: z.number(),
    credentials: z.lazy(() => ImportExternalTestAssignmentResultsCredentials$inboundSchema).optional(),
    assignmentId: z.string().optional(),
    classId: z.string().optional(),
    testUrl: z.string().optional(),
    testId: z.string().optional(),
    courseIdOnFail: z.nullable(z.string()),
    hasFallbackCourse: z.boolean(),
});
/** @internal */
export const ImportExternalTestAssignmentResultsResponse$outboundSchema = z.object({
    lessonType: ImportExternalTestAssignmentResultsLessonType$outboundSchema,
    lessonId: z.nullable(z.string()),
    toolProvider: z.string(),
    finalized: z.boolean(),
    attempt: z.number(),
    credentials: z.lazy(() => ImportExternalTestAssignmentResultsCredentials$outboundSchema).optional(),
    assignmentId: z.string().optional(),
    classId: z.string().optional(),
    testUrl: z.string().optional(),
    testId: z.string().optional(),
    courseIdOnFail: z.nullable(z.string()),
    hasFallbackCourse: z.boolean(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ImportExternalTestAssignmentResultsResponse$;
(function (ImportExternalTestAssignmentResultsResponse$) {
    /** @deprecated use `ImportExternalTestAssignmentResultsResponse$inboundSchema` instead. */
    ImportExternalTestAssignmentResultsResponse$.inboundSchema = ImportExternalTestAssignmentResultsResponse$inboundSchema;
    /** @deprecated use `ImportExternalTestAssignmentResultsResponse$outboundSchema` instead. */
    ImportExternalTestAssignmentResultsResponse$.outboundSchema = ImportExternalTestAssignmentResultsResponse$outboundSchema;
})(ImportExternalTestAssignmentResultsResponse$ || (ImportExternalTestAssignmentResultsResponse$ = {}));
export function importExternalTestAssignmentResultsResponseToJSON(importExternalTestAssignmentResultsResponse) {
    return JSON.stringify(ImportExternalTestAssignmentResultsResponse$outboundSchema.parse(importExternalTestAssignmentResultsResponse));
}
export function importExternalTestAssignmentResultsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ImportExternalTestAssignmentResultsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportExternalTestAssignmentResultsResponse' from JSON`);
}
//# sourceMappingURL=importexternaltestassignmentresults.js.map