/*
 * 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";
/** @internal */
export const UpdateStudentQuestionResponseResponse$inboundSchema = z.union([
    components.PowerPath100UpdateStudentQuestionResponseResult$inboundSchema.and(z.object({ lessonType: z.literal("powerpath-100") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
    components.QuizUpdateStudentQuestionResponseResult$inboundSchema.and(z.object({ lessonType: z.literal("quiz") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
    components.TestOutUpdateStudentQuestionResponseResult$inboundSchema.and(z.object({ lessonType: z.literal("test-out") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
    components.PlacementUpdateStudentQuestionResponseResult$inboundSchema.and(z.object({ lessonType: z.literal("placement") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
]);
/** @internal */
export const UpdateStudentQuestionResponseResponse$outboundSchema = z.union([
    components.PowerPath100UpdateStudentQuestionResponseResult$outboundSchema.and(z.object({ lessonType: z.literal("powerpath-100") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
    components.QuizUpdateStudentQuestionResponseResult$outboundSchema.and(z.object({ lessonType: z.literal("quiz") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
    components.TestOutUpdateStudentQuestionResponseResult$outboundSchema.and(z.object({ lessonType: z.literal("test-out") }).transform((v) => ({
        lessonType: v.lessonType,
    }))),
    components.PlacementUpdateStudentQuestionResponseResult$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 UpdateStudentQuestionResponseResponse$;
(function (UpdateStudentQuestionResponseResponse$) {
    /** @deprecated use `UpdateStudentQuestionResponseResponse$inboundSchema` instead. */
    UpdateStudentQuestionResponseResponse$.inboundSchema = UpdateStudentQuestionResponseResponse$inboundSchema;
    /** @deprecated use `UpdateStudentQuestionResponseResponse$outboundSchema` instead. */
    UpdateStudentQuestionResponseResponse$.outboundSchema = UpdateStudentQuestionResponseResponse$outboundSchema;
})(UpdateStudentQuestionResponseResponse$ || (UpdateStudentQuestionResponseResponse$ = {}));
export function updateStudentQuestionResponseResponseToJSON(updateStudentQuestionResponseResponse) {
    return JSON.stringify(UpdateStudentQuestionResponseResponse$outboundSchema.parse(updateStudentQuestionResponseResponse));
}
export function updateStudentQuestionResponseResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateStudentQuestionResponseResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateStudentQuestionResponseResponse' from JSON`);
}
//# sourceMappingURL=updatestudentquestionresponse.js.map