/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const GetCourseStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const GetCourseRequest$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetCourseRequest$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 GetCourseRequest$;
(function (GetCourseRequest$) {
    /** @deprecated use `GetCourseRequest$inboundSchema` instead. */
    GetCourseRequest$.inboundSchema = GetCourseRequest$inboundSchema;
    /** @deprecated use `GetCourseRequest$outboundSchema` instead. */
    GetCourseRequest$.outboundSchema = GetCourseRequest$outboundSchema;
})(GetCourseRequest$ || (GetCourseRequest$ = {}));
export function getCourseRequestToJSON(getCourseRequest) {
    return JSON.stringify(GetCourseRequest$outboundSchema.parse(getCourseRequest));
}
export function getCourseRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseRequest' from JSON`);
}
/** @internal */
export const GetCourseStatus$inboundSchema = z.nativeEnum(GetCourseStatus);
/** @internal */
export const GetCourseStatus$outboundSchema = GetCourseStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetCourseStatus$;
(function (GetCourseStatus$) {
    /** @deprecated use `GetCourseStatus$inboundSchema` instead. */
    GetCourseStatus$.inboundSchema = GetCourseStatus$inboundSchema;
    /** @deprecated use `GetCourseStatus$outboundSchema` instead. */
    GetCourseStatus$.outboundSchema = GetCourseStatus$outboundSchema;
})(GetCourseStatus$ || (GetCourseStatus$ = {}));
/** @internal */
export const GetCourseAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetCourseAcademicSession$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 GetCourseAcademicSession$;
(function (GetCourseAcademicSession$) {
    /** @deprecated use `GetCourseAcademicSession$inboundSchema` instead. */
    GetCourseAcademicSession$.inboundSchema = GetCourseAcademicSession$inboundSchema;
    /** @deprecated use `GetCourseAcademicSession$outboundSchema` instead. */
    GetCourseAcademicSession$.outboundSchema = GetCourseAcademicSession$outboundSchema;
})(GetCourseAcademicSession$ || (GetCourseAcademicSession$ = {}));
export function getCourseAcademicSessionToJSON(getCourseAcademicSession) {
    return JSON.stringify(GetCourseAcademicSession$outboundSchema.parse(getCourseAcademicSession));
}
export function getCourseAcademicSessionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseAcademicSession' from JSON`);
}
/** @internal */
export const GetCourseOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetCourseOrg$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 GetCourseOrg$;
(function (GetCourseOrg$) {
    /** @deprecated use `GetCourseOrg$inboundSchema` instead. */
    GetCourseOrg$.inboundSchema = GetCourseOrg$inboundSchema;
    /** @deprecated use `GetCourseOrg$outboundSchema` instead. */
    GetCourseOrg$.outboundSchema = GetCourseOrg$outboundSchema;
})(GetCourseOrg$ || (GetCourseOrg$ = {}));
export function getCourseOrgToJSON(getCourseOrg) {
    return JSON.stringify(GetCourseOrg$outboundSchema.parse(getCourseOrg));
}
export function getCourseOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseOrg' from JSON`);
}
/** @internal */
export const GetCourseCourse$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: GetCourseStatus$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(() => GetCourseAcademicSession$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(() => GetCourseOrg$inboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(z.string()).optional(),
});
/** @internal */
export const GetCourseCourse$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: GetCourseStatus$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(() => GetCourseAcademicSession$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(() => GetCourseOrg$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 GetCourseCourse$;
(function (GetCourseCourse$) {
    /** @deprecated use `GetCourseCourse$inboundSchema` instead. */
    GetCourseCourse$.inboundSchema = GetCourseCourse$inboundSchema;
    /** @deprecated use `GetCourseCourse$outboundSchema` instead. */
    GetCourseCourse$.outboundSchema = GetCourseCourse$outboundSchema;
})(GetCourseCourse$ || (GetCourseCourse$ = {}));
export function getCourseCourseToJSON(getCourseCourse) {
    return JSON.stringify(GetCourseCourse$outboundSchema.parse(getCourseCourse));
}
export function getCourseCourseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseCourse' from JSON`);
}
/** @internal */
export const GetCourseResponse$inboundSchema = z.object({
    course: z.lazy(() => GetCourseCourse$inboundSchema),
});
/** @internal */
export const GetCourseResponse$outboundSchema = z.object({
    course: z.lazy(() => GetCourseCourse$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetCourseResponse$;
(function (GetCourseResponse$) {
    /** @deprecated use `GetCourseResponse$inboundSchema` instead. */
    GetCourseResponse$.inboundSchema = GetCourseResponse$inboundSchema;
    /** @deprecated use `GetCourseResponse$outboundSchema` instead. */
    GetCourseResponse$.outboundSchema = GetCourseResponse$outboundSchema;
})(GetCourseResponse$ || (GetCourseResponse$ = {}));
export function getCourseResponseToJSON(getCourseResponse) {
    return JSON.stringify(GetCourseResponse$outboundSchema.parse(getCourseResponse));
}
export function getCourseResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseResponse' from JSON`);
}
//# sourceMappingURL=getcourse.js.map