/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateCourseStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const CreateCourseStatus$inboundSchema = z.nativeEnum(CreateCourseStatus);
/** @internal */
export const CreateCourseStatus$outboundSchema = CreateCourseStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateCourseStatus$;
(function (CreateCourseStatus$) {
    /** @deprecated use `CreateCourseStatus$inboundSchema` instead. */
    CreateCourseStatus$.inboundSchema = CreateCourseStatus$inboundSchema;
    /** @deprecated use `CreateCourseStatus$outboundSchema` instead. */
    CreateCourseStatus$.outboundSchema = CreateCourseStatus$outboundSchema;
})(CreateCourseStatus$ || (CreateCourseStatus$ = {}));
/** @internal */
export const CreateCourseAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateCourseAcademicSession$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 CreateCourseAcademicSession$;
(function (CreateCourseAcademicSession$) {
    /** @deprecated use `CreateCourseAcademicSession$inboundSchema` instead. */
    CreateCourseAcademicSession$.inboundSchema = CreateCourseAcademicSession$inboundSchema;
    /** @deprecated use `CreateCourseAcademicSession$outboundSchema` instead. */
    CreateCourseAcademicSession$.outboundSchema = CreateCourseAcademicSession$outboundSchema;
})(CreateCourseAcademicSession$ || (CreateCourseAcademicSession$ = {}));
export function createCourseAcademicSessionToJSON(createCourseAcademicSession) {
    return JSON.stringify(CreateCourseAcademicSession$outboundSchema.parse(createCourseAcademicSession));
}
export function createCourseAcademicSessionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseAcademicSession' from JSON`);
}
/** @internal */
export const CreateCourseOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateCourseOrg$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 CreateCourseOrg$;
(function (CreateCourseOrg$) {
    /** @deprecated use `CreateCourseOrg$inboundSchema` instead. */
    CreateCourseOrg$.inboundSchema = CreateCourseOrg$inboundSchema;
    /** @deprecated use `CreateCourseOrg$outboundSchema` instead. */
    CreateCourseOrg$.outboundSchema = CreateCourseOrg$outboundSchema;
})(CreateCourseOrg$ || (CreateCourseOrg$ = {}));
export function createCourseOrgToJSON(createCourseOrg) {
    return JSON.stringify(CreateCourseOrg$outboundSchema.parse(createCourseOrg));
}
export function createCourseOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseOrg' from JSON`);
}
/** @internal */
export const CreateCourseCourse$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateCourseStatus$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(() => CreateCourseAcademicSession$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(() => CreateCourseOrg$inboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(z.string()).optional(),
});
/** @internal */
export const CreateCourseCourse$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateCourseStatus$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(() => CreateCourseAcademicSession$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(() => CreateCourseOrg$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 CreateCourseCourse$;
(function (CreateCourseCourse$) {
    /** @deprecated use `CreateCourseCourse$inboundSchema` instead. */
    CreateCourseCourse$.inboundSchema = CreateCourseCourse$inboundSchema;
    /** @deprecated use `CreateCourseCourse$outboundSchema` instead. */
    CreateCourseCourse$.outboundSchema = CreateCourseCourse$outboundSchema;
})(CreateCourseCourse$ || (CreateCourseCourse$ = {}));
export function createCourseCourseToJSON(createCourseCourse) {
    return JSON.stringify(CreateCourseCourse$outboundSchema.parse(createCourseCourse));
}
export function createCourseCourseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseCourse' from JSON`);
}
/** @internal */
export const CreateCourseRequest$inboundSchema = z.object({
    course: z.lazy(() => CreateCourseCourse$inboundSchema),
});
/** @internal */
export const CreateCourseRequest$outboundSchema = z.object({
    course: z.lazy(() => CreateCourseCourse$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateCourseRequest$;
(function (CreateCourseRequest$) {
    /** @deprecated use `CreateCourseRequest$inboundSchema` instead. */
    CreateCourseRequest$.inboundSchema = CreateCourseRequest$inboundSchema;
    /** @deprecated use `CreateCourseRequest$outboundSchema` instead. */
    CreateCourseRequest$.outboundSchema = CreateCourseRequest$outboundSchema;
})(CreateCourseRequest$ || (CreateCourseRequest$ = {}));
export function createCourseRequestToJSON(createCourseRequest) {
    return JSON.stringify(CreateCourseRequest$outboundSchema.parse(createCourseRequest));
}
export function createCourseRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseRequest' from JSON`);
}
/** @internal */
export const CreateCourseSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
export const CreateCourseSourcedIdPairs$outboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: 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 CreateCourseSourcedIdPairs$;
(function (CreateCourseSourcedIdPairs$) {
    /** @deprecated use `CreateCourseSourcedIdPairs$inboundSchema` instead. */
    CreateCourseSourcedIdPairs$.inboundSchema = CreateCourseSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateCourseSourcedIdPairs$outboundSchema` instead. */
    CreateCourseSourcedIdPairs$.outboundSchema = CreateCourseSourcedIdPairs$outboundSchema;
})(CreateCourseSourcedIdPairs$ || (CreateCourseSourcedIdPairs$ = {}));
export function createCourseSourcedIdPairsToJSON(createCourseSourcedIdPairs) {
    return JSON.stringify(CreateCourseSourcedIdPairs$outboundSchema.parse(createCourseSourcedIdPairs));
}
export function createCourseSourcedIdPairsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseSourcedIdPairs' from JSON`);
}
/** @internal */
export const CreateCourseResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateCourseSourcedIdPairs$inboundSchema),
});
/** @internal */
export const CreateCourseResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateCourseSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateCourseResponse$;
(function (CreateCourseResponse$) {
    /** @deprecated use `CreateCourseResponse$inboundSchema` instead. */
    CreateCourseResponse$.inboundSchema = CreateCourseResponse$inboundSchema;
    /** @deprecated use `CreateCourseResponse$outboundSchema` instead. */
    CreateCourseResponse$.outboundSchema = CreateCourseResponse$outboundSchema;
})(CreateCourseResponse$ || (CreateCourseResponse$ = {}));
export function createCourseResponseToJSON(createCourseResponse) {
    return JSON.stringify(CreateCourseResponse$outboundSchema.parse(createCourseResponse));
}
export function createCourseResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseResponse' from JSON`);
}
//# sourceMappingURL=createcourse.js.map