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