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