/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const ScoreScaleStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const ScoreScaleStatus$inboundSchema = z.nativeEnum(ScoreScaleStatus);
/** @internal */
export const ScoreScaleStatus$outboundSchema = ScoreScaleStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ScoreScaleStatus$;
(function (ScoreScaleStatus$) {
    /** @deprecated use `ScoreScaleStatus$inboundSchema` instead. */
    ScoreScaleStatus$.inboundSchema = ScoreScaleStatus$inboundSchema;
    /** @deprecated use `ScoreScaleStatus$outboundSchema` instead. */
    ScoreScaleStatus$.outboundSchema = ScoreScaleStatus$outboundSchema;
})(ScoreScaleStatus$ || (ScoreScaleStatus$ = {}));
/** @internal */
export const ScoreScaleClass$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const ScoreScaleClass$outboundSchema = z.object({
    sourcedId: 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 ScoreScaleClass$;
(function (ScoreScaleClass$) {
    /** @deprecated use `ScoreScaleClass$inboundSchema` instead. */
    ScoreScaleClass$.inboundSchema = ScoreScaleClass$inboundSchema;
    /** @deprecated use `ScoreScaleClass$outboundSchema` instead. */
    ScoreScaleClass$.outboundSchema = ScoreScaleClass$outboundSchema;
})(ScoreScaleClass$ || (ScoreScaleClass$ = {}));
export function scoreScaleClassToJSON(scoreScaleClass) {
    return JSON.stringify(ScoreScaleClass$outboundSchema.parse(scoreScaleClass));
}
export function scoreScaleClassFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ScoreScaleClass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScoreScaleClass' from JSON`);
}
/** @internal */
export const ScoreScaleCourse$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const ScoreScaleCourse$outboundSchema = z.object({
    sourcedId: 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 ScoreScaleCourse$;
(function (ScoreScaleCourse$) {
    /** @deprecated use `ScoreScaleCourse$inboundSchema` instead. */
    ScoreScaleCourse$.inboundSchema = ScoreScaleCourse$inboundSchema;
    /** @deprecated use `ScoreScaleCourse$outboundSchema` instead. */
    ScoreScaleCourse$.outboundSchema = ScoreScaleCourse$outboundSchema;
})(ScoreScaleCourse$ || (ScoreScaleCourse$ = {}));
export function scoreScaleCourseToJSON(scoreScaleCourse) {
    return JSON.stringify(ScoreScaleCourse$outboundSchema.parse(scoreScaleCourse));
}
export function scoreScaleCourseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ScoreScaleCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScoreScaleCourse' from JSON`);
}
/** @internal */
export const ScoreScaleValue$inboundSchema = z.object({
    itemValueLHS: z.string(),
    itemValueRHS: z.string(),
    value: z.string().optional(),
    description: z.string().optional(),
});
/** @internal */
export const ScoreScaleValue$outboundSchema = z.object({
    itemValueLHS: z.string(),
    itemValueRHS: z.string(),
    value: z.string().optional(),
    description: 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 ScoreScaleValue$;
(function (ScoreScaleValue$) {
    /** @deprecated use `ScoreScaleValue$inboundSchema` instead. */
    ScoreScaleValue$.inboundSchema = ScoreScaleValue$inboundSchema;
    /** @deprecated use `ScoreScaleValue$outboundSchema` instead. */
    ScoreScaleValue$.outboundSchema = ScoreScaleValue$outboundSchema;
})(ScoreScaleValue$ || (ScoreScaleValue$ = {}));
export function scoreScaleValueToJSON(scoreScaleValue) {
    return JSON.stringify(ScoreScaleValue$outboundSchema.parse(scoreScaleValue));
}
export function scoreScaleValueFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ScoreScaleValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScoreScaleValue' from JSON`);
}
/** @internal */
export const ScoreScale$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: ScoreScaleStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    type: z.string(),
    class: z.lazy(() => ScoreScaleClass$inboundSchema),
    course: z.nullable(z.lazy(() => ScoreScaleCourse$inboundSchema)).optional(),
    scoreScaleValue: z.array(z.lazy(() => ScoreScaleValue$inboundSchema)),
});
/** @internal */
export const ScoreScale$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: ScoreScaleStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    type: z.string(),
    class: z.lazy(() => ScoreScaleClass$outboundSchema),
    course: z.nullable(z.lazy(() => ScoreScaleCourse$outboundSchema)).optional(),
    scoreScaleValue: z.array(z.lazy(() => ScoreScaleValue$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ScoreScale$;
(function (ScoreScale$) {
    /** @deprecated use `ScoreScale$inboundSchema` instead. */
    ScoreScale$.inboundSchema = ScoreScale$inboundSchema;
    /** @deprecated use `ScoreScale$outboundSchema` instead. */
    ScoreScale$.outboundSchema = ScoreScale$outboundSchema;
})(ScoreScale$ || (ScoreScale$ = {}));
export function scoreScaleToJSON(scoreScale) {
    return JSON.stringify(ScoreScale$outboundSchema.parse(scoreScale));
}
export function scoreScaleFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ScoreScale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScoreScale' from JSON`);
}
//# sourceMappingURL=scorescale.js.map