"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetTreeResponse$ = exports.GetTreeResponse$outboundSchema = exports.GetTreeResponse$inboundSchema = exports.GetTreeLessonPlan$ = exports.GetTreeLessonPlan$outboundSchema = exports.GetTreeLessonPlan$inboundSchema = exports.GetTreeLessonPlanLessonPlan$ = exports.GetTreeLessonPlanLessonPlan$outboundSchema = exports.GetTreeLessonPlanLessonPlan$inboundSchema = exports.GetTreeCourse$ = exports.GetTreeCourse$outboundSchema = exports.GetTreeCourse$inboundSchema = exports.GetTreeOrg$ = exports.GetTreeOrg$outboundSchema = exports.GetTreeOrg$inboundSchema = exports.GetTreeAcademicSession$ = exports.GetTreeAcademicSession$outboundSchema = exports.GetTreeAcademicSession$inboundSchema = exports.GetTreeStatus$ = exports.GetTreeStatus$outboundSchema = exports.GetTreeStatus$inboundSchema = exports.GetTreeRequest$ = exports.GetTreeRequest$outboundSchema = exports.GetTreeRequest$inboundSchema = exports.GetTreeStatus = void 0;
exports.getTreeRequestToJSON = getTreeRequestToJSON;
exports.getTreeRequestFromJSON = getTreeRequestFromJSON;
exports.getTreeAcademicSessionToJSON = getTreeAcademicSessionToJSON;
exports.getTreeAcademicSessionFromJSON = getTreeAcademicSessionFromJSON;
exports.getTreeOrgToJSON = getTreeOrgToJSON;
exports.getTreeOrgFromJSON = getTreeOrgFromJSON;
exports.getTreeCourseToJSON = getTreeCourseToJSON;
exports.getTreeCourseFromJSON = getTreeCourseFromJSON;
exports.getTreeLessonPlanLessonPlanToJSON = getTreeLessonPlanLessonPlanToJSON;
exports.getTreeLessonPlanLessonPlanFromJSON = getTreeLessonPlanLessonPlanFromJSON;
exports.getTreeLessonPlanToJSON = getTreeLessonPlanToJSON;
exports.getTreeLessonPlanFromJSON = getTreeLessonPlanFromJSON;
exports.getTreeResponseToJSON = getTreeResponseToJSON;
exports.getTreeResponseFromJSON = getTreeResponseFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
exports.GetTreeStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.GetTreeRequest$inboundSchema = z.object({
    courseId: z.string(),
    userId: z.string(),
});
/** @internal */
exports.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.
 */
var GetTreeRequest$;
(function (GetTreeRequest$) {
    /** @deprecated use `GetTreeRequest$inboundSchema` instead. */
    GetTreeRequest$.inboundSchema = exports.GetTreeRequest$inboundSchema;
    /** @deprecated use `GetTreeRequest$outboundSchema` instead. */
    GetTreeRequest$.outboundSchema = exports.GetTreeRequest$outboundSchema;
})(GetTreeRequest$ || (exports.GetTreeRequest$ = GetTreeRequest$ = {}));
function getTreeRequestToJSON(getTreeRequest) {
    return JSON.stringify(exports.GetTreeRequest$outboundSchema.parse(getTreeRequest));
}
function getTreeRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetTreeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeRequest' from JSON`);
}
/** @internal */
exports.GetTreeStatus$inboundSchema = z.nativeEnum(exports.GetTreeStatus);
/** @internal */
exports.GetTreeStatus$outboundSchema = exports.GetTreeStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetTreeStatus$;
(function (GetTreeStatus$) {
    /** @deprecated use `GetTreeStatus$inboundSchema` instead. */
    GetTreeStatus$.inboundSchema = exports.GetTreeStatus$inboundSchema;
    /** @deprecated use `GetTreeStatus$outboundSchema` instead. */
    GetTreeStatus$.outboundSchema = exports.GetTreeStatus$outboundSchema;
})(GetTreeStatus$ || (exports.GetTreeStatus$ = GetTreeStatus$ = {}));
/** @internal */
exports.GetTreeAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.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.
 */
var GetTreeAcademicSession$;
(function (GetTreeAcademicSession$) {
    /** @deprecated use `GetTreeAcademicSession$inboundSchema` instead. */
    GetTreeAcademicSession$.inboundSchema = exports.GetTreeAcademicSession$inboundSchema;
    /** @deprecated use `GetTreeAcademicSession$outboundSchema` instead. */
    GetTreeAcademicSession$.outboundSchema = exports.GetTreeAcademicSession$outboundSchema;
})(GetTreeAcademicSession$ || (exports.GetTreeAcademicSession$ = GetTreeAcademicSession$ = {}));
function getTreeAcademicSessionToJSON(getTreeAcademicSession) {
    return JSON.stringify(exports.GetTreeAcademicSession$outboundSchema.parse(getTreeAcademicSession));
}
function getTreeAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetTreeAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeAcademicSession' from JSON`);
}
/** @internal */
exports.GetTreeOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.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.
 */
var GetTreeOrg$;
(function (GetTreeOrg$) {
    /** @deprecated use `GetTreeOrg$inboundSchema` instead. */
    GetTreeOrg$.inboundSchema = exports.GetTreeOrg$inboundSchema;
    /** @deprecated use `GetTreeOrg$outboundSchema` instead. */
    GetTreeOrg$.outboundSchema = exports.GetTreeOrg$outboundSchema;
})(GetTreeOrg$ || (exports.GetTreeOrg$ = GetTreeOrg$ = {}));
function getTreeOrgToJSON(getTreeOrg) {
    return JSON.stringify(exports.GetTreeOrg$outboundSchema.parse(getTreeOrg));
}
function getTreeOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetTreeOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeOrg' from JSON`);
}
/** @internal */
exports.GetTreeCourse$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(() => exports.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(() => exports.GetTreeOrg$inboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(z.string()).optional(),
});
/** @internal */
exports.GetTreeCourse$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(() => exports.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(() => exports.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.
 */
var GetTreeCourse$;
(function (GetTreeCourse$) {
    /** @deprecated use `GetTreeCourse$inboundSchema` instead. */
    GetTreeCourse$.inboundSchema = exports.GetTreeCourse$inboundSchema;
    /** @deprecated use `GetTreeCourse$outboundSchema` instead. */
    GetTreeCourse$.outboundSchema = exports.GetTreeCourse$outboundSchema;
})(GetTreeCourse$ || (exports.GetTreeCourse$ = GetTreeCourse$ = {}));
function getTreeCourseToJSON(getTreeCourse) {
    return JSON.stringify(exports.GetTreeCourse$outboundSchema.parse(getTreeCourse));
}
function getTreeCourseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetTreeCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeCourse' from JSON`);
}
/** @internal */
exports.GetTreeLessonPlanLessonPlan$inboundSchema = z.object({
    course: z.lazy(() => exports.GetTreeCourse$inboundSchema),
    subComponents: z.array(components.LessonPlanTreeComponent$inboundSchema),
});
/** @internal */
exports.GetTreeLessonPlanLessonPlan$outboundSchema = z.object({
    course: z.lazy(() => exports.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.
 */
var GetTreeLessonPlanLessonPlan$;
(function (GetTreeLessonPlanLessonPlan$) {
    /** @deprecated use `GetTreeLessonPlanLessonPlan$inboundSchema` instead. */
    GetTreeLessonPlanLessonPlan$.inboundSchema = exports.GetTreeLessonPlanLessonPlan$inboundSchema;
    /** @deprecated use `GetTreeLessonPlanLessonPlan$outboundSchema` instead. */
    GetTreeLessonPlanLessonPlan$.outboundSchema = exports.GetTreeLessonPlanLessonPlan$outboundSchema;
})(GetTreeLessonPlanLessonPlan$ || (exports.GetTreeLessonPlanLessonPlan$ = GetTreeLessonPlanLessonPlan$ = {}));
function getTreeLessonPlanLessonPlanToJSON(getTreeLessonPlanLessonPlan) {
    return JSON.stringify(exports.GetTreeLessonPlanLessonPlan$outboundSchema.parse(getTreeLessonPlanLessonPlan));
}
function getTreeLessonPlanLessonPlanFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetTreeLessonPlanLessonPlan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeLessonPlanLessonPlan' from JSON`);
}
/** @internal */
exports.GetTreeLessonPlan$inboundSchema = z.object({
    lessonPlan: z.lazy(() => exports.GetTreeLessonPlanLessonPlan$inboundSchema),
});
/** @internal */
exports.GetTreeLessonPlan$outboundSchema = z.object({
    lessonPlan: z.lazy(() => exports.GetTreeLessonPlanLessonPlan$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetTreeLessonPlan$;
(function (GetTreeLessonPlan$) {
    /** @deprecated use `GetTreeLessonPlan$inboundSchema` instead. */
    GetTreeLessonPlan$.inboundSchema = exports.GetTreeLessonPlan$inboundSchema;
    /** @deprecated use `GetTreeLessonPlan$outboundSchema` instead. */
    GetTreeLessonPlan$.outboundSchema = exports.GetTreeLessonPlan$outboundSchema;
})(GetTreeLessonPlan$ || (exports.GetTreeLessonPlan$ = GetTreeLessonPlan$ = {}));
function getTreeLessonPlanToJSON(getTreeLessonPlan) {
    return JSON.stringify(exports.GetTreeLessonPlan$outboundSchema.parse(getTreeLessonPlan));
}
function getTreeLessonPlanFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetTreeLessonPlan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeLessonPlan' from JSON`);
}
/** @internal */
exports.GetTreeResponse$inboundSchema = z.object({
    lessonPlan: z.lazy(() => exports.GetTreeLessonPlan$inboundSchema),
});
/** @internal */
exports.GetTreeResponse$outboundSchema = z.object({
    lessonPlan: z.lazy(() => exports.GetTreeLessonPlan$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetTreeResponse$;
(function (GetTreeResponse$) {
    /** @deprecated use `GetTreeResponse$inboundSchema` instead. */
    GetTreeResponse$.inboundSchema = exports.GetTreeResponse$inboundSchema;
    /** @deprecated use `GetTreeResponse$outboundSchema` instead. */
    GetTreeResponse$.outboundSchema = exports.GetTreeResponse$outboundSchema;
})(GetTreeResponse$ || (exports.GetTreeResponse$ = GetTreeResponse$ = {}));
function getTreeResponseToJSON(getTreeResponse) {
    return JSON.stringify(exports.GetTreeResponse$outboundSchema.parse(getTreeResponse));
}
function getTreeResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetTreeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTreeResponse' from JSON`);
}
//# sourceMappingURL=gettree.js.map