/*
 * 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 GetTreeStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const GetTreeRequest$inboundSchema = z.object({
    courseId: z.string(),
    userId: z.string(),
});
/** @internal */
export const GetTreeRequest$outboundSchema = z.object({
    courseId: z.string(),
    userId: 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 GetTreeRequest$;
(function (GetTreeRequest$) {
    /** @deprecated use `GetTreeRequest$inboundSchema` instead. */
    GetTreeRequest$.inboundSchema = GetTreeRequest$inboundSchema;
    /** @deprecated use `GetTreeRequest$outboundSchema` instead. */
    GetTreeRequest$.outboundSchema = GetTreeRequest$outboundSchema;
})(GetTreeRequest$ || (GetTreeRequest$ = {}));
export function getTreeRequestToJSON(getTreeRequest) {
    return JSON.stringify(GetTreeRequest$outboundSchema.parse(getTreeRequest));
}
export function getTreeRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTreeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeRequest' from JSON`);
}
/** @internal */
export const GetTreeStatus$inboundSchema = z.nativeEnum(GetTreeStatus);
/** @internal */
export const GetTreeStatus$outboundSchema = GetTreeStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetTreeStatus$;
(function (GetTreeStatus$) {
    /** @deprecated use `GetTreeStatus$inboundSchema` instead. */
    GetTreeStatus$.inboundSchema = GetTreeStatus$inboundSchema;
    /** @deprecated use `GetTreeStatus$outboundSchema` instead. */
    GetTreeStatus$.outboundSchema = GetTreeStatus$outboundSchema;
})(GetTreeStatus$ || (GetTreeStatus$ = {}));
/** @internal */
export const GetTreeAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetTreeAcademicSession$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 GetTreeAcademicSession$;
(function (GetTreeAcademicSession$) {
    /** @deprecated use `GetTreeAcademicSession$inboundSchema` instead. */
    GetTreeAcademicSession$.inboundSchema = GetTreeAcademicSession$inboundSchema;
    /** @deprecated use `GetTreeAcademicSession$outboundSchema` instead. */
    GetTreeAcademicSession$.outboundSchema = GetTreeAcademicSession$outboundSchema;
})(GetTreeAcademicSession$ || (GetTreeAcademicSession$ = {}));
export function getTreeAcademicSessionToJSON(getTreeAcademicSession) {
    return JSON.stringify(GetTreeAcademicSession$outboundSchema.parse(getTreeAcademicSession));
}
export function getTreeAcademicSessionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTreeAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeAcademicSession' from JSON`);
}
/** @internal */
export const GetTreeOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetTreeOrg$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 GetTreeOrg$;
(function (GetTreeOrg$) {
    /** @deprecated use `GetTreeOrg$inboundSchema` instead. */
    GetTreeOrg$.inboundSchema = GetTreeOrg$inboundSchema;
    /** @deprecated use `GetTreeOrg$outboundSchema` instead. */
    GetTreeOrg$.outboundSchema = GetTreeOrg$outboundSchema;
})(GetTreeOrg$ || (GetTreeOrg$ = {}));
export function getTreeOrgToJSON(getTreeOrg) {
    return JSON.stringify(GetTreeOrg$outboundSchema.parse(getTreeOrg));
}
export function getTreeOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTreeOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeOrg' from JSON`);
}
/** @internal */
export const GetTreeCourse$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: GetTreeStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    academicSession: z.nullable(z.lazy(() => GetTreeAcademicSession$inboundSchema)).optional(),
    courseCode: z.nullable(z.string()).optional(),
    grades: z.nullable(z.array(z.string())).optional(),
    subjects: z.nullable(z.array(z.string())).optional(),
    subjectCodes: z.nullable(z.array(z.string())).optional(),
    org: z.lazy(() => GetTreeOrg$inboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(z.string()).optional(),
});
/** @internal */
export const GetTreeCourse$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: GetTreeStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    academicSession: z.nullable(z.lazy(() => GetTreeAcademicSession$outboundSchema)).optional(),
    courseCode: z.nullable(z.string()).optional(),
    grades: z.nullable(z.array(z.string())).optional(),
    subjects: z.nullable(z.array(z.string())).optional(),
    subjectCodes: z.nullable(z.array(z.string())).optional(),
    org: z.lazy(() => GetTreeOrg$outboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(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 GetTreeCourse$;
(function (GetTreeCourse$) {
    /** @deprecated use `GetTreeCourse$inboundSchema` instead. */
    GetTreeCourse$.inboundSchema = GetTreeCourse$inboundSchema;
    /** @deprecated use `GetTreeCourse$outboundSchema` instead. */
    GetTreeCourse$.outboundSchema = GetTreeCourse$outboundSchema;
})(GetTreeCourse$ || (GetTreeCourse$ = {}));
export function getTreeCourseToJSON(getTreeCourse) {
    return JSON.stringify(GetTreeCourse$outboundSchema.parse(getTreeCourse));
}
export function getTreeCourseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTreeCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeCourse' from JSON`);
}
/** @internal */
export const GetTreeLessonPlanLessonPlan$inboundSchema = z.object({
    course: z.lazy(() => GetTreeCourse$inboundSchema),
    subComponents: z.array(components.LessonPlanTreeComponent$inboundSchema),
});
/** @internal */
export const GetTreeLessonPlanLessonPlan$outboundSchema = z.object({
    course: z.lazy(() => GetTreeCourse$outboundSchema),
    subComponents: z.array(components.LessonPlanTreeComponent$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetTreeLessonPlanLessonPlan$;
(function (GetTreeLessonPlanLessonPlan$) {
    /** @deprecated use `GetTreeLessonPlanLessonPlan$inboundSchema` instead. */
    GetTreeLessonPlanLessonPlan$.inboundSchema = GetTreeLessonPlanLessonPlan$inboundSchema;
    /** @deprecated use `GetTreeLessonPlanLessonPlan$outboundSchema` instead. */
    GetTreeLessonPlanLessonPlan$.outboundSchema = GetTreeLessonPlanLessonPlan$outboundSchema;
})(GetTreeLessonPlanLessonPlan$ || (GetTreeLessonPlanLessonPlan$ = {}));
export function getTreeLessonPlanLessonPlanToJSON(getTreeLessonPlanLessonPlan) {
    return JSON.stringify(GetTreeLessonPlanLessonPlan$outboundSchema.parse(getTreeLessonPlanLessonPlan));
}
export function getTreeLessonPlanLessonPlanFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTreeLessonPlanLessonPlan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeLessonPlanLessonPlan' from JSON`);
}
/** @internal */
export const GetTreeLessonPlan$inboundSchema = z.object({
    lessonPlan: z.lazy(() => GetTreeLessonPlanLessonPlan$inboundSchema),
});
/** @internal */
export const GetTreeLessonPlan$outboundSchema = z.object({
    lessonPlan: z.lazy(() => GetTreeLessonPlanLessonPlan$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetTreeLessonPlan$;
(function (GetTreeLessonPlan$) {
    /** @deprecated use `GetTreeLessonPlan$inboundSchema` instead. */
    GetTreeLessonPlan$.inboundSchema = GetTreeLessonPlan$inboundSchema;
    /** @deprecated use `GetTreeLessonPlan$outboundSchema` instead. */
    GetTreeLessonPlan$.outboundSchema = GetTreeLessonPlan$outboundSchema;
})(GetTreeLessonPlan$ || (GetTreeLessonPlan$ = {}));
export function getTreeLessonPlanToJSON(getTreeLessonPlan) {
    return JSON.stringify(GetTreeLessonPlan$outboundSchema.parse(getTreeLessonPlan));
}
export function getTreeLessonPlanFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTreeLessonPlan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeLessonPlan' from JSON`);
}
/** @internal */
export const GetTreeResponse$inboundSchema = z.object({
    lessonPlan: z.lazy(() => GetTreeLessonPlan$inboundSchema),
});
/** @internal */
export const GetTreeResponse$outboundSchema = z.object({
    lessonPlan: z.lazy(() => GetTreeLessonPlan$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetTreeResponse$;
(function (GetTreeResponse$) {
    /** @deprecated use `GetTreeResponse$inboundSchema` instead. */
    GetTreeResponse$.inboundSchema = GetTreeResponse$inboundSchema;
    /** @deprecated use `GetTreeResponse$outboundSchema` instead. */
    GetTreeResponse$.outboundSchema = GetTreeResponse$outboundSchema;
})(GetTreeResponse$ || (GetTreeResponse$ = {}));
export function getTreeResponseToJSON(getTreeResponse) {
    return JSON.stringify(GetTreeResponse$outboundSchema.parse(getTreeResponse));
}
export function getTreeResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTreeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeResponse' from JSON`);
}
//# sourceMappingURL=gettree.js.map