"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.GetAllCoursesResponse$ = exports.GetAllCoursesResponse$outboundSchema = exports.GetAllCoursesResponse$inboundSchema = exports.GetAllCoursesResponseBody$ = exports.GetAllCoursesResponseBody$outboundSchema = exports.GetAllCoursesResponseBody$inboundSchema = exports.GetAllCoursesCourse$ = exports.GetAllCoursesCourse$outboundSchema = exports.GetAllCoursesCourse$inboundSchema = exports.GetAllCoursesOrg$ = exports.GetAllCoursesOrg$outboundSchema = exports.GetAllCoursesOrg$inboundSchema = exports.GetAllCoursesAcademicSession$ = exports.GetAllCoursesAcademicSession$outboundSchema = exports.GetAllCoursesAcademicSession$inboundSchema = exports.GetAllCoursesStatus$ = exports.GetAllCoursesStatus$outboundSchema = exports.GetAllCoursesStatus$inboundSchema = exports.GetAllCoursesRequest$ = exports.GetAllCoursesRequest$outboundSchema = exports.GetAllCoursesRequest$inboundSchema = exports.GetAllCoursesOrderBy$ = exports.GetAllCoursesOrderBy$outboundSchema = exports.GetAllCoursesOrderBy$inboundSchema = exports.GetAllCoursesStatus = exports.GetAllCoursesOrderBy = void 0;
exports.getAllCoursesRequestToJSON = getAllCoursesRequestToJSON;
exports.getAllCoursesRequestFromJSON = getAllCoursesRequestFromJSON;
exports.getAllCoursesAcademicSessionToJSON = getAllCoursesAcademicSessionToJSON;
exports.getAllCoursesAcademicSessionFromJSON = getAllCoursesAcademicSessionFromJSON;
exports.getAllCoursesOrgToJSON = getAllCoursesOrgToJSON;
exports.getAllCoursesOrgFromJSON = getAllCoursesOrgFromJSON;
exports.getAllCoursesCourseToJSON = getAllCoursesCourseToJSON;
exports.getAllCoursesCourseFromJSON = getAllCoursesCourseFromJSON;
exports.getAllCoursesResponseBodyToJSON = getAllCoursesResponseBodyToJSON;
exports.getAllCoursesResponseBodyFromJSON = getAllCoursesResponseBodyFromJSON;
exports.getAllCoursesResponseToJSON = getAllCoursesResponseToJSON;
exports.getAllCoursesResponseFromJSON = getAllCoursesResponseFromJSON;
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.GetAllCoursesOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
exports.GetAllCoursesStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.GetAllCoursesOrderBy$inboundSchema = z.nativeEnum(exports.GetAllCoursesOrderBy);
/** @internal */
exports.GetAllCoursesOrderBy$outboundSchema = exports.GetAllCoursesOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCoursesOrderBy$;
(function (GetAllCoursesOrderBy$) {
    /** @deprecated use `GetAllCoursesOrderBy$inboundSchema` instead. */
    GetAllCoursesOrderBy$.inboundSchema = exports.GetAllCoursesOrderBy$inboundSchema;
    /** @deprecated use `GetAllCoursesOrderBy$outboundSchema` instead. */
    GetAllCoursesOrderBy$.outboundSchema = exports.GetAllCoursesOrderBy$outboundSchema;
})(GetAllCoursesOrderBy$ || (exports.GetAllCoursesOrderBy$ = GetAllCoursesOrderBy$ = {}));
/** @internal */
exports.GetAllCoursesRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllCoursesOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetAllCoursesRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllCoursesOrderBy$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 GetAllCoursesRequest$;
(function (GetAllCoursesRequest$) {
    /** @deprecated use `GetAllCoursesRequest$inboundSchema` instead. */
    GetAllCoursesRequest$.inboundSchema = exports.GetAllCoursesRequest$inboundSchema;
    /** @deprecated use `GetAllCoursesRequest$outboundSchema` instead. */
    GetAllCoursesRequest$.outboundSchema = exports.GetAllCoursesRequest$outboundSchema;
})(GetAllCoursesRequest$ || (exports.GetAllCoursesRequest$ = GetAllCoursesRequest$ = {}));
function getAllCoursesRequestToJSON(getAllCoursesRequest) {
    return JSON.stringify(exports.GetAllCoursesRequest$outboundSchema.parse(getAllCoursesRequest));
}
function getAllCoursesRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCoursesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCoursesRequest' from JSON`);
}
/** @internal */
exports.GetAllCoursesStatus$inboundSchema = z.nativeEnum(exports.GetAllCoursesStatus);
/** @internal */
exports.GetAllCoursesStatus$outboundSchema = exports.GetAllCoursesStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCoursesStatus$;
(function (GetAllCoursesStatus$) {
    /** @deprecated use `GetAllCoursesStatus$inboundSchema` instead. */
    GetAllCoursesStatus$.inboundSchema = exports.GetAllCoursesStatus$inboundSchema;
    /** @deprecated use `GetAllCoursesStatus$outboundSchema` instead. */
    GetAllCoursesStatus$.outboundSchema = exports.GetAllCoursesStatus$outboundSchema;
})(GetAllCoursesStatus$ || (exports.GetAllCoursesStatus$ = GetAllCoursesStatus$ = {}));
/** @internal */
exports.GetAllCoursesAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.GetAllCoursesAcademicSession$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 GetAllCoursesAcademicSession$;
(function (GetAllCoursesAcademicSession$) {
    /** @deprecated use `GetAllCoursesAcademicSession$inboundSchema` instead. */
    GetAllCoursesAcademicSession$.inboundSchema = exports.GetAllCoursesAcademicSession$inboundSchema;
    /** @deprecated use `GetAllCoursesAcademicSession$outboundSchema` instead. */
    GetAllCoursesAcademicSession$.outboundSchema = exports.GetAllCoursesAcademicSession$outboundSchema;
})(GetAllCoursesAcademicSession$ || (exports.GetAllCoursesAcademicSession$ = GetAllCoursesAcademicSession$ = {}));
function getAllCoursesAcademicSessionToJSON(getAllCoursesAcademicSession) {
    return JSON.stringify(exports.GetAllCoursesAcademicSession$outboundSchema.parse(getAllCoursesAcademicSession));
}
function getAllCoursesAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCoursesAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCoursesAcademicSession' from JSON`);
}
/** @internal */
exports.GetAllCoursesOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.GetAllCoursesOrg$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 GetAllCoursesOrg$;
(function (GetAllCoursesOrg$) {
    /** @deprecated use `GetAllCoursesOrg$inboundSchema` instead. */
    GetAllCoursesOrg$.inboundSchema = exports.GetAllCoursesOrg$inboundSchema;
    /** @deprecated use `GetAllCoursesOrg$outboundSchema` instead. */
    GetAllCoursesOrg$.outboundSchema = exports.GetAllCoursesOrg$outboundSchema;
})(GetAllCoursesOrg$ || (exports.GetAllCoursesOrg$ = GetAllCoursesOrg$ = {}));
function getAllCoursesOrgToJSON(getAllCoursesOrg) {
    return JSON.stringify(exports.GetAllCoursesOrg$outboundSchema.parse(getAllCoursesOrg));
}
function getAllCoursesOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCoursesOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCoursesOrg' from JSON`);
}
/** @internal */
exports.GetAllCoursesCourse$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.GetAllCoursesStatus$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.GetAllCoursesAcademicSession$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.GetAllCoursesOrg$inboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(z.string()).optional(),
});
/** @internal */
exports.GetAllCoursesCourse$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.GetAllCoursesStatus$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.GetAllCoursesAcademicSession$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.GetAllCoursesOrg$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 GetAllCoursesCourse$;
(function (GetAllCoursesCourse$) {
    /** @deprecated use `GetAllCoursesCourse$inboundSchema` instead. */
    GetAllCoursesCourse$.inboundSchema = exports.GetAllCoursesCourse$inboundSchema;
    /** @deprecated use `GetAllCoursesCourse$outboundSchema` instead. */
    GetAllCoursesCourse$.outboundSchema = exports.GetAllCoursesCourse$outboundSchema;
})(GetAllCoursesCourse$ || (exports.GetAllCoursesCourse$ = GetAllCoursesCourse$ = {}));
function getAllCoursesCourseToJSON(getAllCoursesCourse) {
    return JSON.stringify(exports.GetAllCoursesCourse$outboundSchema.parse(getAllCoursesCourse));
}
function getAllCoursesCourseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCoursesCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCoursesCourse' from JSON`);
}
/** @internal */
exports.GetAllCoursesResponseBody$inboundSchema = z.object({
    courses: z.array(z.lazy(() => exports.GetAllCoursesCourse$inboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetAllCoursesResponseBody$outboundSchema = z.object({
    courses: z.array(z.lazy(() => exports.GetAllCoursesCourse$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 GetAllCoursesResponseBody$;
(function (GetAllCoursesResponseBody$) {
    /** @deprecated use `GetAllCoursesResponseBody$inboundSchema` instead. */
    GetAllCoursesResponseBody$.inboundSchema = exports.GetAllCoursesResponseBody$inboundSchema;
    /** @deprecated use `GetAllCoursesResponseBody$outboundSchema` instead. */
    GetAllCoursesResponseBody$.outboundSchema = exports.GetAllCoursesResponseBody$outboundSchema;
})(GetAllCoursesResponseBody$ || (exports.GetAllCoursesResponseBody$ = GetAllCoursesResponseBody$ = {}));
function getAllCoursesResponseBodyToJSON(getAllCoursesResponseBody) {
    return JSON.stringify(exports.GetAllCoursesResponseBody$outboundSchema.parse(getAllCoursesResponseBody));
}
function getAllCoursesResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCoursesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCoursesResponseBody' from JSON`);
}
/** @internal */
exports.GetAllCoursesResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetAllCoursesResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetAllCoursesResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetAllCoursesResponseBody$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 GetAllCoursesResponse$;
(function (GetAllCoursesResponse$) {
    /** @deprecated use `GetAllCoursesResponse$inboundSchema` instead. */
    GetAllCoursesResponse$.inboundSchema = exports.GetAllCoursesResponse$inboundSchema;
    /** @deprecated use `GetAllCoursesResponse$outboundSchema` instead. */
    GetAllCoursesResponse$.outboundSchema = exports.GetAllCoursesResponse$outboundSchema;
})(GetAllCoursesResponse$ || (exports.GetAllCoursesResponse$ = GetAllCoursesResponse$ = {}));
function getAllCoursesResponseToJSON(getAllCoursesResponse) {
    return JSON.stringify(exports.GetAllCoursesResponse$outboundSchema.parse(getAllCoursesResponse));
}
function getAllCoursesResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCoursesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCoursesResponse' from JSON`);
}
//# sourceMappingURL=getallcourses.js.map