"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.GetCoursesForSchoolResponse$ = exports.GetCoursesForSchoolResponse$outboundSchema = exports.GetCoursesForSchoolResponse$inboundSchema = exports.GetCoursesForSchoolResponseBody$ = exports.GetCoursesForSchoolResponseBody$outboundSchema = exports.GetCoursesForSchoolResponseBody$inboundSchema = exports.GetCoursesForSchoolCourse$ = exports.GetCoursesForSchoolCourse$outboundSchema = exports.GetCoursesForSchoolCourse$inboundSchema = exports.GetCoursesForSchoolOrg$ = exports.GetCoursesForSchoolOrg$outboundSchema = exports.GetCoursesForSchoolOrg$inboundSchema = exports.GetCoursesForSchoolAcademicSession$ = exports.GetCoursesForSchoolAcademicSession$outboundSchema = exports.GetCoursesForSchoolAcademicSession$inboundSchema = exports.GetCoursesForSchoolStatus$ = exports.GetCoursesForSchoolStatus$outboundSchema = exports.GetCoursesForSchoolStatus$inboundSchema = exports.GetCoursesForSchoolRequest$ = exports.GetCoursesForSchoolRequest$outboundSchema = exports.GetCoursesForSchoolRequest$inboundSchema = exports.GetCoursesForSchoolOrderBy$ = exports.GetCoursesForSchoolOrderBy$outboundSchema = exports.GetCoursesForSchoolOrderBy$inboundSchema = exports.GetCoursesForSchoolStatus = exports.GetCoursesForSchoolOrderBy = void 0;
exports.getCoursesForSchoolRequestToJSON = getCoursesForSchoolRequestToJSON;
exports.getCoursesForSchoolRequestFromJSON = getCoursesForSchoolRequestFromJSON;
exports.getCoursesForSchoolAcademicSessionToJSON = getCoursesForSchoolAcademicSessionToJSON;
exports.getCoursesForSchoolAcademicSessionFromJSON = getCoursesForSchoolAcademicSessionFromJSON;
exports.getCoursesForSchoolOrgToJSON = getCoursesForSchoolOrgToJSON;
exports.getCoursesForSchoolOrgFromJSON = getCoursesForSchoolOrgFromJSON;
exports.getCoursesForSchoolCourseToJSON = getCoursesForSchoolCourseToJSON;
exports.getCoursesForSchoolCourseFromJSON = getCoursesForSchoolCourseFromJSON;
exports.getCoursesForSchoolResponseBodyToJSON = getCoursesForSchoolResponseBodyToJSON;
exports.getCoursesForSchoolResponseBodyFromJSON = getCoursesForSchoolResponseBodyFromJSON;
exports.getCoursesForSchoolResponseToJSON = getCoursesForSchoolResponseToJSON;
exports.getCoursesForSchoolResponseFromJSON = getCoursesForSchoolResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The order to sort the response by
 */
exports.GetCoursesForSchoolOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
exports.GetCoursesForSchoolStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.GetCoursesForSchoolOrderBy$inboundSchema = z.nativeEnum(exports.GetCoursesForSchoolOrderBy);
/** @internal */
exports.GetCoursesForSchoolOrderBy$outboundSchema = exports.GetCoursesForSchoolOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetCoursesForSchoolOrderBy$;
(function (GetCoursesForSchoolOrderBy$) {
    /** @deprecated use `GetCoursesForSchoolOrderBy$inboundSchema` instead. */
    GetCoursesForSchoolOrderBy$.inboundSchema = exports.GetCoursesForSchoolOrderBy$inboundSchema;
    /** @deprecated use `GetCoursesForSchoolOrderBy$outboundSchema` instead. */
    GetCoursesForSchoolOrderBy$.outboundSchema = exports.GetCoursesForSchoolOrderBy$outboundSchema;
})(GetCoursesForSchoolOrderBy$ || (exports.GetCoursesForSchoolOrderBy$ = GetCoursesForSchoolOrderBy$ = {}));
/** @internal */
exports.GetCoursesForSchoolRequest$inboundSchema = z.object({
    schoolSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetCoursesForSchoolOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetCoursesForSchoolRequest$outboundSchema = z.object({
    schoolSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetCoursesForSchoolOrderBy$outboundSchema.optional(),
    filter: z.string().optional(),
    search: 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 GetCoursesForSchoolRequest$;
(function (GetCoursesForSchoolRequest$) {
    /** @deprecated use `GetCoursesForSchoolRequest$inboundSchema` instead. */
    GetCoursesForSchoolRequest$.inboundSchema = exports.GetCoursesForSchoolRequest$inboundSchema;
    /** @deprecated use `GetCoursesForSchoolRequest$outboundSchema` instead. */
    GetCoursesForSchoolRequest$.outboundSchema = exports.GetCoursesForSchoolRequest$outboundSchema;
})(GetCoursesForSchoolRequest$ || (exports.GetCoursesForSchoolRequest$ = GetCoursesForSchoolRequest$ = {}));
function getCoursesForSchoolRequestToJSON(getCoursesForSchoolRequest) {
    return JSON.stringify(exports.GetCoursesForSchoolRequest$outboundSchema.parse(getCoursesForSchoolRequest));
}
function getCoursesForSchoolRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetCoursesForSchoolRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCoursesForSchoolRequest' from JSON`);
}
/** @internal */
exports.GetCoursesForSchoolStatus$inboundSchema = z.nativeEnum(exports.GetCoursesForSchoolStatus);
/** @internal */
exports.GetCoursesForSchoolStatus$outboundSchema = exports.GetCoursesForSchoolStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetCoursesForSchoolStatus$;
(function (GetCoursesForSchoolStatus$) {
    /** @deprecated use `GetCoursesForSchoolStatus$inboundSchema` instead. */
    GetCoursesForSchoolStatus$.inboundSchema = exports.GetCoursesForSchoolStatus$inboundSchema;
    /** @deprecated use `GetCoursesForSchoolStatus$outboundSchema` instead. */
    GetCoursesForSchoolStatus$.outboundSchema = exports.GetCoursesForSchoolStatus$outboundSchema;
})(GetCoursesForSchoolStatus$ || (exports.GetCoursesForSchoolStatus$ = GetCoursesForSchoolStatus$ = {}));
/** @internal */
exports.GetCoursesForSchoolAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.GetCoursesForSchoolAcademicSession$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 GetCoursesForSchoolAcademicSession$;
(function (GetCoursesForSchoolAcademicSession$) {
    /** @deprecated use `GetCoursesForSchoolAcademicSession$inboundSchema` instead. */
    GetCoursesForSchoolAcademicSession$.inboundSchema = exports.GetCoursesForSchoolAcademicSession$inboundSchema;
    /** @deprecated use `GetCoursesForSchoolAcademicSession$outboundSchema` instead. */
    GetCoursesForSchoolAcademicSession$.outboundSchema = exports.GetCoursesForSchoolAcademicSession$outboundSchema;
})(GetCoursesForSchoolAcademicSession$ || (exports.GetCoursesForSchoolAcademicSession$ = GetCoursesForSchoolAcademicSession$ = {}));
function getCoursesForSchoolAcademicSessionToJSON(getCoursesForSchoolAcademicSession) {
    return JSON.stringify(exports.GetCoursesForSchoolAcademicSession$outboundSchema.parse(getCoursesForSchoolAcademicSession));
}
function getCoursesForSchoolAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetCoursesForSchoolAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCoursesForSchoolAcademicSession' from JSON`);
}
/** @internal */
exports.GetCoursesForSchoolOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.GetCoursesForSchoolOrg$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 GetCoursesForSchoolOrg$;
(function (GetCoursesForSchoolOrg$) {
    /** @deprecated use `GetCoursesForSchoolOrg$inboundSchema` instead. */
    GetCoursesForSchoolOrg$.inboundSchema = exports.GetCoursesForSchoolOrg$inboundSchema;
    /** @deprecated use `GetCoursesForSchoolOrg$outboundSchema` instead. */
    GetCoursesForSchoolOrg$.outboundSchema = exports.GetCoursesForSchoolOrg$outboundSchema;
})(GetCoursesForSchoolOrg$ || (exports.GetCoursesForSchoolOrg$ = GetCoursesForSchoolOrg$ = {}));
function getCoursesForSchoolOrgToJSON(getCoursesForSchoolOrg) {
    return JSON.stringify(exports.GetCoursesForSchoolOrg$outboundSchema.parse(getCoursesForSchoolOrg));
}
function getCoursesForSchoolOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetCoursesForSchoolOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCoursesForSchoolOrg' from JSON`);
}
/** @internal */
exports.GetCoursesForSchoolCourse$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.GetCoursesForSchoolStatus$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.GetCoursesForSchoolAcademicSession$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.GetCoursesForSchoolOrg$inboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(z.string()).optional(),
});
/** @internal */
exports.GetCoursesForSchoolCourse$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.GetCoursesForSchoolStatus$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.GetCoursesForSchoolAcademicSession$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.GetCoursesForSchoolOrg$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 GetCoursesForSchoolCourse$;
(function (GetCoursesForSchoolCourse$) {
    /** @deprecated use `GetCoursesForSchoolCourse$inboundSchema` instead. */
    GetCoursesForSchoolCourse$.inboundSchema = exports.GetCoursesForSchoolCourse$inboundSchema;
    /** @deprecated use `GetCoursesForSchoolCourse$outboundSchema` instead. */
    GetCoursesForSchoolCourse$.outboundSchema = exports.GetCoursesForSchoolCourse$outboundSchema;
})(GetCoursesForSchoolCourse$ || (exports.GetCoursesForSchoolCourse$ = GetCoursesForSchoolCourse$ = {}));
function getCoursesForSchoolCourseToJSON(getCoursesForSchoolCourse) {
    return JSON.stringify(exports.GetCoursesForSchoolCourse$outboundSchema.parse(getCoursesForSchoolCourse));
}
function getCoursesForSchoolCourseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetCoursesForSchoolCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCoursesForSchoolCourse' from JSON`);
}
/** @internal */
exports.GetCoursesForSchoolResponseBody$inboundSchema = z.object({
    courses: z.array(z.lazy(() => exports.GetCoursesForSchoolCourse$inboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetCoursesForSchoolResponseBody$outboundSchema = z.object({
    courses: z.array(z.lazy(() => exports.GetCoursesForSchoolCourse$outboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetCoursesForSchoolResponseBody$;
(function (GetCoursesForSchoolResponseBody$) {
    /** @deprecated use `GetCoursesForSchoolResponseBody$inboundSchema` instead. */
    GetCoursesForSchoolResponseBody$.inboundSchema = exports.GetCoursesForSchoolResponseBody$inboundSchema;
    /** @deprecated use `GetCoursesForSchoolResponseBody$outboundSchema` instead. */
    GetCoursesForSchoolResponseBody$.outboundSchema = exports.GetCoursesForSchoolResponseBody$outboundSchema;
})(GetCoursesForSchoolResponseBody$ || (exports.GetCoursesForSchoolResponseBody$ = GetCoursesForSchoolResponseBody$ = {}));
function getCoursesForSchoolResponseBodyToJSON(getCoursesForSchoolResponseBody) {
    return JSON.stringify(exports.GetCoursesForSchoolResponseBody$outboundSchema.parse(getCoursesForSchoolResponseBody));
}
function getCoursesForSchoolResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetCoursesForSchoolResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCoursesForSchoolResponseBody' from JSON`);
}
/** @internal */
exports.GetCoursesForSchoolResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetCoursesForSchoolResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetCoursesForSchoolResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetCoursesForSchoolResponseBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        result: "Result",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetCoursesForSchoolResponse$;
(function (GetCoursesForSchoolResponse$) {
    /** @deprecated use `GetCoursesForSchoolResponse$inboundSchema` instead. */
    GetCoursesForSchoolResponse$.inboundSchema = exports.GetCoursesForSchoolResponse$inboundSchema;
    /** @deprecated use `GetCoursesForSchoolResponse$outboundSchema` instead. */
    GetCoursesForSchoolResponse$.outboundSchema = exports.GetCoursesForSchoolResponse$outboundSchema;
})(GetCoursesForSchoolResponse$ || (exports.GetCoursesForSchoolResponse$ = GetCoursesForSchoolResponse$ = {}));
function getCoursesForSchoolResponseToJSON(getCoursesForSchoolResponse) {
    return JSON.stringify(exports.GetCoursesForSchoolResponse$outboundSchema.parse(getCoursesForSchoolResponse));
}
function getCoursesForSchoolResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetCoursesForSchoolResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCoursesForSchoolResponse' from JSON`);
}
//# sourceMappingURL=getcoursesforschool.js.map