/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
/**
 * The difficulty of the question
 */
export const PowerPathTestQuestionDifficulty = {
    Easy: "easy",
    Medium: "medium",
    Hard: "hard",
};
/** @internal */
export const PowerPathTestQuestionDifficulty$inboundSchema = z.nativeEnum(PowerPathTestQuestionDifficulty);
/** @internal */
export const PowerPathTestQuestionDifficulty$outboundSchema = PowerPathTestQuestionDifficulty$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PowerPathTestQuestionDifficulty$;
(function (PowerPathTestQuestionDifficulty$) {
    /** @deprecated use `PowerPathTestQuestionDifficulty$inboundSchema` instead. */
    PowerPathTestQuestionDifficulty$.inboundSchema = PowerPathTestQuestionDifficulty$inboundSchema;
    /** @deprecated use `PowerPathTestQuestionDifficulty$outboundSchema` instead. */
    PowerPathTestQuestionDifficulty$.outboundSchema = PowerPathTestQuestionDifficulty$outboundSchema;
})(PowerPathTestQuestionDifficulty$ || (PowerPathTestQuestionDifficulty$ = {}));
/** @internal */
export const PowerPathTestQuestionContent$inboundSchema = z.object({
    type: z.string().optional(),
    rawXml: z.string(),
});
/** @internal */
export const PowerPathTestQuestionContent$outboundSchema = z.object({
    type: z.string().optional(),
    rawXml: 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 PowerPathTestQuestionContent$;
(function (PowerPathTestQuestionContent$) {
    /** @deprecated use `PowerPathTestQuestionContent$inboundSchema` instead. */
    PowerPathTestQuestionContent$.inboundSchema = PowerPathTestQuestionContent$inboundSchema;
    /** @deprecated use `PowerPathTestQuestionContent$outboundSchema` instead. */
    PowerPathTestQuestionContent$.outboundSchema = PowerPathTestQuestionContent$outboundSchema;
})(PowerPathTestQuestionContent$ || (PowerPathTestQuestionContent$ = {}));
export function powerPathTestQuestionContentToJSON(powerPathTestQuestionContent) {
    return JSON.stringify(PowerPathTestQuestionContent$outboundSchema.parse(powerPathTestQuestionContent));
}
export function powerPathTestQuestionContentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PowerPathTestQuestionContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PowerPathTestQuestionContent' from JSON`);
}
/** @internal */
export const PowerPathTestQuestionResponse$inboundSchema = z.union([z.string(), z.array(z.string())]);
/** @internal */
export const PowerPathTestQuestionResponse$outboundSchema = z.union([z.string(), z.array(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 PowerPathTestQuestionResponse$;
(function (PowerPathTestQuestionResponse$) {
    /** @deprecated use `PowerPathTestQuestionResponse$inboundSchema` instead. */
    PowerPathTestQuestionResponse$.inboundSchema = PowerPathTestQuestionResponse$inboundSchema;
    /** @deprecated use `PowerPathTestQuestionResponse$outboundSchema` instead. */
    PowerPathTestQuestionResponse$.outboundSchema = PowerPathTestQuestionResponse$outboundSchema;
})(PowerPathTestQuestionResponse$ || (PowerPathTestQuestionResponse$ = {}));
export function powerPathTestQuestionResponseToJSON(powerPathTestQuestionResponse) {
    return JSON.stringify(PowerPathTestQuestionResponse$outboundSchema.parse(powerPathTestQuestionResponse));
}
export function powerPathTestQuestionResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PowerPathTestQuestionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PowerPathTestQuestionResponse' from JSON`);
}
/** @internal */
export const PowerPathTestQuestionResult$inboundSchema = z.object({
    score: z.number(),
    feedback: z.string(),
});
/** @internal */
export const PowerPathTestQuestionResult$outboundSchema = z.object({
    score: z.number(),
    feedback: 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 PowerPathTestQuestionResult$;
(function (PowerPathTestQuestionResult$) {
    /** @deprecated use `PowerPathTestQuestionResult$inboundSchema` instead. */
    PowerPathTestQuestionResult$.inboundSchema = PowerPathTestQuestionResult$inboundSchema;
    /** @deprecated use `PowerPathTestQuestionResult$outboundSchema` instead. */
    PowerPathTestQuestionResult$.outboundSchema = PowerPathTestQuestionResult$outboundSchema;
})(PowerPathTestQuestionResult$ || (PowerPathTestQuestionResult$ = {}));
export function powerPathTestQuestionResultToJSON(powerPathTestQuestionResult) {
    return JSON.stringify(PowerPathTestQuestionResult$outboundSchema.parse(powerPathTestQuestionResult));
}
export function powerPathTestQuestionResultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PowerPathTestQuestionResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PowerPathTestQuestionResult' from JSON`);
}
/** @internal */
export const PowerPathTestQuestion$inboundSchema = z.object({
    id: z.string(),
    index: z.number(),
    title: z.string(),
    url: z.string(),
    difficulty: PowerPathTestQuestionDifficulty$inboundSchema.default("medium"),
    content: z.lazy(() => PowerPathTestQuestionContent$inboundSchema).optional(),
    response: z.union([z.string(), z.array(z.string())]).optional(),
    correct: z.boolean().optional(),
    result: z.lazy(() => PowerPathTestQuestionResult$inboundSchema).optional(),
});
/** @internal */
export const PowerPathTestQuestion$outboundSchema = z.object({
    id: z.string(),
    index: z.number(),
    title: z.string(),
    url: z.string(),
    difficulty: PowerPathTestQuestionDifficulty$outboundSchema.default("medium"),
    content: z.lazy(() => PowerPathTestQuestionContent$outboundSchema).optional(),
    response: z.union([z.string(), z.array(z.string())]).optional(),
    correct: z.boolean().optional(),
    result: z.lazy(() => PowerPathTestQuestionResult$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 PowerPathTestQuestion$;
(function (PowerPathTestQuestion$) {
    /** @deprecated use `PowerPathTestQuestion$inboundSchema` instead. */
    PowerPathTestQuestion$.inboundSchema = PowerPathTestQuestion$inboundSchema;
    /** @deprecated use `PowerPathTestQuestion$outboundSchema` instead. */
    PowerPathTestQuestion$.outboundSchema = PowerPathTestQuestion$outboundSchema;
})(PowerPathTestQuestion$ || (PowerPathTestQuestion$ = {}));
export function powerPathTestQuestionToJSON(powerPathTestQuestion) {
    return JSON.stringify(PowerPathTestQuestion$outboundSchema.parse(powerPathTestQuestion));
}
export function powerPathTestQuestionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PowerPathTestQuestion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PowerPathTestQuestion' from JSON`);
}
//# sourceMappingURL=powerpathtestquestion.js.map