/*
 * 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 CreateExternalPlacementTestLessonType = {
    Powerpath100: "powerpath-100",
    Quiz: "quiz",
    TestOut: "test-out",
    Placement: "placement",
};
/** @internal */
export const CreateExternalPlacementTestRequest$inboundSchema = z.union([
    components.CreateExternalTestOutInput$inboundSchema.and(z.object({ lessonType: z.literal("test-out") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
    components.CreateExternalPlacementInput$inboundSchema.and(z.object({ lessonType: z.literal("placement") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
]);
/** @internal */
export const CreateExternalPlacementTestRequest$outboundSchema = z.union([
    components.CreateExternalTestOutInput$outboundSchema.and(z.object({ lessonType: z.literal("test-out") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
    components.CreateExternalPlacementInput$outboundSchema.and(z.object({ lessonType: z.literal("placement") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateExternalPlacementTestRequest$;
(function (CreateExternalPlacementTestRequest$) {
    /** @deprecated use `CreateExternalPlacementTestRequest$inboundSchema` instead. */
    CreateExternalPlacementTestRequest$.inboundSchema = CreateExternalPlacementTestRequest$inboundSchema;
    /** @deprecated use `CreateExternalPlacementTestRequest$outboundSchema` instead. */
    CreateExternalPlacementTestRequest$.outboundSchema = CreateExternalPlacementTestRequest$outboundSchema;
})(CreateExternalPlacementTestRequest$ || (CreateExternalPlacementTestRequest$ = {}));
export function createExternalPlacementTestRequestToJSON(createExternalPlacementTestRequest) {
    return JSON.stringify(CreateExternalPlacementTestRequest$outboundSchema.parse(createExternalPlacementTestRequest));
}
export function createExternalPlacementTestRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateExternalPlacementTestRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateExternalPlacementTestRequest' from JSON`);
}
/** @internal */
export const CreateExternalPlacementTestLessonType$inboundSchema = z.nativeEnum(CreateExternalPlacementTestLessonType);
/** @internal */
export const CreateExternalPlacementTestLessonType$outboundSchema = CreateExternalPlacementTestLessonType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateExternalPlacementTestLessonType$;
(function (CreateExternalPlacementTestLessonType$) {
    /** @deprecated use `CreateExternalPlacementTestLessonType$inboundSchema` instead. */
    CreateExternalPlacementTestLessonType$.inboundSchema = CreateExternalPlacementTestLessonType$inboundSchema;
    /** @deprecated use `CreateExternalPlacementTestLessonType$outboundSchema` instead. */
    CreateExternalPlacementTestLessonType$.outboundSchema = CreateExternalPlacementTestLessonType$outboundSchema;
})(CreateExternalPlacementTestLessonType$ || (CreateExternalPlacementTestLessonType$ = {}));
/** @internal */
export const CreateExternalPlacementTestResponse$inboundSchema = z.object({
    lessonType: CreateExternalPlacementTestLessonType$inboundSchema,
    lessonId: z.string(),
    courseComponentId: z.string(),
    resourceId: z.string(),
    launchUrl: z.string().optional(),
    toolProvider: z.string(),
    vendorId: z.string(),
    courseIdOnFail: z.nullable(z.string()).optional(),
    grades: z.array(z.number()).optional(),
});
/** @internal */
export const CreateExternalPlacementTestResponse$outboundSchema = z.object({
    lessonType: CreateExternalPlacementTestLessonType$outboundSchema,
    lessonId: z.string(),
    courseComponentId: z.string(),
    resourceId: z.string(),
    launchUrl: z.string().optional(),
    toolProvider: z.string(),
    vendorId: z.string(),
    courseIdOnFail: z.nullable(z.string()).optional(),
    grades: z.array(z.number()).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateExternalPlacementTestResponse$;
(function (CreateExternalPlacementTestResponse$) {
    /** @deprecated use `CreateExternalPlacementTestResponse$inboundSchema` instead. */
    CreateExternalPlacementTestResponse$.inboundSchema = CreateExternalPlacementTestResponse$inboundSchema;
    /** @deprecated use `CreateExternalPlacementTestResponse$outboundSchema` instead. */
    CreateExternalPlacementTestResponse$.outboundSchema = CreateExternalPlacementTestResponse$outboundSchema;
})(CreateExternalPlacementTestResponse$ || (CreateExternalPlacementTestResponse$ = {}));
export function createExternalPlacementTestResponseToJSON(createExternalPlacementTestResponse) {
    return JSON.stringify(CreateExternalPlacementTestResponse$outboundSchema.parse(createExternalPlacementTestResponse));
}
export function createExternalPlacementTestResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateExternalPlacementTestResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateExternalPlacementTestResponse' from JSON`);
}
//# sourceMappingURL=createexternalplacementtest.js.map