/*
 * 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";
export const PutCourseStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const PutCourseStatus$inboundSchema = z.nativeEnum(PutCourseStatus);
/** @internal */
export const PutCourseStatus$outboundSchema = PutCourseStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PutCourseStatus$;
(function (PutCourseStatus$) {
    /** @deprecated use `PutCourseStatus$inboundSchema` instead. */
    PutCourseStatus$.inboundSchema = PutCourseStatus$inboundSchema;
    /** @deprecated use `PutCourseStatus$outboundSchema` instead. */
    PutCourseStatus$.outboundSchema = PutCourseStatus$outboundSchema;
})(PutCourseStatus$ || (PutCourseStatus$ = {}));
/** @internal */
export const PutCourseAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PutCourseAcademicSession$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 PutCourseAcademicSession$;
(function (PutCourseAcademicSession$) {
    /** @deprecated use `PutCourseAcademicSession$inboundSchema` instead. */
    PutCourseAcademicSession$.inboundSchema = PutCourseAcademicSession$inboundSchema;
    /** @deprecated use `PutCourseAcademicSession$outboundSchema` instead. */
    PutCourseAcademicSession$.outboundSchema = PutCourseAcademicSession$outboundSchema;
})(PutCourseAcademicSession$ || (PutCourseAcademicSession$ = {}));
export function putCourseAcademicSessionToJSON(putCourseAcademicSession) {
    return JSON.stringify(PutCourseAcademicSession$outboundSchema.parse(putCourseAcademicSession));
}
export function putCourseAcademicSessionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseAcademicSession' from JSON`);
}
/** @internal */
export const PutCourseOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PutCourseOrg$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 PutCourseOrg$;
(function (PutCourseOrg$) {
    /** @deprecated use `PutCourseOrg$inboundSchema` instead. */
    PutCourseOrg$.inboundSchema = PutCourseOrg$inboundSchema;
    /** @deprecated use `PutCourseOrg$outboundSchema` instead. */
    PutCourseOrg$.outboundSchema = PutCourseOrg$outboundSchema;
})(PutCourseOrg$ || (PutCourseOrg$ = {}));
export function putCourseOrgToJSON(putCourseOrg) {
    return JSON.stringify(PutCourseOrg$outboundSchema.parse(putCourseOrg));
}
export function putCourseOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseOrg' from JSON`);
}
/** @internal */
export const PutCourseCourse$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: PutCourseStatus$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(() => PutCourseAcademicSession$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(() => PutCourseOrg$inboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(z.string()).optional(),
});
/** @internal */
export const PutCourseCourse$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: PutCourseStatus$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(() => PutCourseAcademicSession$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(() => PutCourseOrg$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 PutCourseCourse$;
(function (PutCourseCourse$) {
    /** @deprecated use `PutCourseCourse$inboundSchema` instead. */
    PutCourseCourse$.inboundSchema = PutCourseCourse$inboundSchema;
    /** @deprecated use `PutCourseCourse$outboundSchema` instead. */
    PutCourseCourse$.outboundSchema = PutCourseCourse$outboundSchema;
})(PutCourseCourse$ || (PutCourseCourse$ = {}));
export function putCourseCourseToJSON(putCourseCourse) {
    return JSON.stringify(PutCourseCourse$outboundSchema.parse(putCourseCourse));
}
export function putCourseCourseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseCourse' from JSON`);
}
/** @internal */
export const PutCourseRequestBody$inboundSchema = z.object({
    course: z.lazy(() => PutCourseCourse$inboundSchema),
});
/** @internal */
export const PutCourseRequestBody$outboundSchema = z.object({
    course: z.lazy(() => PutCourseCourse$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PutCourseRequestBody$;
(function (PutCourseRequestBody$) {
    /** @deprecated use `PutCourseRequestBody$inboundSchema` instead. */
    PutCourseRequestBody$.inboundSchema = PutCourseRequestBody$inboundSchema;
    /** @deprecated use `PutCourseRequestBody$outboundSchema` instead. */
    PutCourseRequestBody$.outboundSchema = PutCourseRequestBody$outboundSchema;
})(PutCourseRequestBody$ || (PutCourseRequestBody$ = {}));
export function putCourseRequestBodyToJSON(putCourseRequestBody) {
    return JSON.stringify(PutCourseRequestBody$outboundSchema.parse(putCourseRequestBody));
}
export function putCourseRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseRequestBody' from JSON`);
}
/** @internal */
export const PutCourseRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => PutCourseRequestBody$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const PutCourseRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => PutCourseRequestBody$outboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PutCourseRequest$;
(function (PutCourseRequest$) {
    /** @deprecated use `PutCourseRequest$inboundSchema` instead. */
    PutCourseRequest$.inboundSchema = PutCourseRequest$inboundSchema;
    /** @deprecated use `PutCourseRequest$outboundSchema` instead. */
    PutCourseRequest$.outboundSchema = PutCourseRequest$outboundSchema;
})(PutCourseRequest$ || (PutCourseRequest$ = {}));
export function putCourseRequestToJSON(putCourseRequest) {
    return JSON.stringify(PutCourseRequest$outboundSchema.parse(putCourseRequest));
}
export function putCourseRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseRequest' from JSON`);
}
//# sourceMappingURL=putcourse.js.map