"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateCourseResponse$ = exports.CreateCourseResponse$outboundSchema = exports.CreateCourseResponse$inboundSchema = exports.CreateCourseSourcedIdPairs$ = exports.CreateCourseSourcedIdPairs$outboundSchema = exports.CreateCourseSourcedIdPairs$inboundSchema = exports.CreateCourseRequest$ = exports.CreateCourseRequest$outboundSchema = exports.CreateCourseRequest$inboundSchema = exports.CreateCourseCourse$ = exports.CreateCourseCourse$outboundSchema = exports.CreateCourseCourse$inboundSchema = exports.CreateCourseOrg$ = exports.CreateCourseOrg$outboundSchema = exports.CreateCourseOrg$inboundSchema = exports.CreateCourseAcademicSession$ = exports.CreateCourseAcademicSession$outboundSchema = exports.CreateCourseAcademicSession$inboundSchema = exports.CreateCourseStatus$ = exports.CreateCourseStatus$outboundSchema = exports.CreateCourseStatus$inboundSchema = exports.CreateCourseStatus = void 0;
exports.createCourseAcademicSessionToJSON = createCourseAcademicSessionToJSON;
exports.createCourseAcademicSessionFromJSON = createCourseAcademicSessionFromJSON;
exports.createCourseOrgToJSON = createCourseOrgToJSON;
exports.createCourseOrgFromJSON = createCourseOrgFromJSON;
exports.createCourseCourseToJSON = createCourseCourseToJSON;
exports.createCourseCourseFromJSON = createCourseCourseFromJSON;
exports.createCourseRequestToJSON = createCourseRequestToJSON;
exports.createCourseRequestFromJSON = createCourseRequestFromJSON;
exports.createCourseSourcedIdPairsToJSON = createCourseSourcedIdPairsToJSON;
exports.createCourseSourcedIdPairsFromJSON = createCourseSourcedIdPairsFromJSON;
exports.createCourseResponseToJSON = createCourseResponseToJSON;
exports.createCourseResponseFromJSON = createCourseResponseFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.CreateCourseStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.CreateCourseStatus$inboundSchema = z.nativeEnum(exports.CreateCourseStatus);
/** @internal */
exports.CreateCourseStatus$outboundSchema = exports.CreateCourseStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateCourseStatus$;
(function (CreateCourseStatus$) {
    /** @deprecated use `CreateCourseStatus$inboundSchema` instead. */
    CreateCourseStatus$.inboundSchema = exports.CreateCourseStatus$inboundSchema;
    /** @deprecated use `CreateCourseStatus$outboundSchema` instead. */
    CreateCourseStatus$.outboundSchema = exports.CreateCourseStatus$outboundSchema;
})(CreateCourseStatus$ || (exports.CreateCourseStatus$ = CreateCourseStatus$ = {}));
/** @internal */
exports.CreateCourseAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.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.
 */
var CreateCourseAcademicSession$;
(function (CreateCourseAcademicSession$) {
    /** @deprecated use `CreateCourseAcademicSession$inboundSchema` instead. */
    CreateCourseAcademicSession$.inboundSchema = exports.CreateCourseAcademicSession$inboundSchema;
    /** @deprecated use `CreateCourseAcademicSession$outboundSchema` instead. */
    CreateCourseAcademicSession$.outboundSchema = exports.CreateCourseAcademicSession$outboundSchema;
})(CreateCourseAcademicSession$ || (exports.CreateCourseAcademicSession$ = CreateCourseAcademicSession$ = {}));
function createCourseAcademicSessionToJSON(createCourseAcademicSession) {
    return JSON.stringify(exports.CreateCourseAcademicSession$outboundSchema.parse(createCourseAcademicSession));
}
function createCourseAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseAcademicSession' from JSON`);
}
/** @internal */
exports.CreateCourseOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.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.
 */
var CreateCourseOrg$;
(function (CreateCourseOrg$) {
    /** @deprecated use `CreateCourseOrg$inboundSchema` instead. */
    CreateCourseOrg$.inboundSchema = exports.CreateCourseOrg$inboundSchema;
    /** @deprecated use `CreateCourseOrg$outboundSchema` instead. */
    CreateCourseOrg$.outboundSchema = exports.CreateCourseOrg$outboundSchema;
})(CreateCourseOrg$ || (exports.CreateCourseOrg$ = CreateCourseOrg$ = {}));
function createCourseOrgToJSON(createCourseOrg) {
    return JSON.stringify(exports.CreateCourseOrg$outboundSchema.parse(createCourseOrg));
}
function createCourseOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseOrg' from JSON`);
}
/** @internal */
exports.CreateCourseCourse$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(() => exports.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(() => exports.CreateCourseOrg$inboundSchema),
    level: z.nullable(z.string()).optional(),
    gradingScheme: z.nullable(z.string()).optional(),
});
/** @internal */
exports.CreateCourseCourse$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(() => exports.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(() => exports.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.
 */
var CreateCourseCourse$;
(function (CreateCourseCourse$) {
    /** @deprecated use `CreateCourseCourse$inboundSchema` instead. */
    CreateCourseCourse$.inboundSchema = exports.CreateCourseCourse$inboundSchema;
    /** @deprecated use `CreateCourseCourse$outboundSchema` instead. */
    CreateCourseCourse$.outboundSchema = exports.CreateCourseCourse$outboundSchema;
})(CreateCourseCourse$ || (exports.CreateCourseCourse$ = CreateCourseCourse$ = {}));
function createCourseCourseToJSON(createCourseCourse) {
    return JSON.stringify(exports.CreateCourseCourse$outboundSchema.parse(createCourseCourse));
}
function createCourseCourseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseCourse' from JSON`);
}
/** @internal */
exports.CreateCourseRequest$inboundSchema = z.object({
    course: z.lazy(() => exports.CreateCourseCourse$inboundSchema),
});
/** @internal */
exports.CreateCourseRequest$outboundSchema = z.object({
    course: z.lazy(() => exports.CreateCourseCourse$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateCourseRequest$;
(function (CreateCourseRequest$) {
    /** @deprecated use `CreateCourseRequest$inboundSchema` instead. */
    CreateCourseRequest$.inboundSchema = exports.CreateCourseRequest$inboundSchema;
    /** @deprecated use `CreateCourseRequest$outboundSchema` instead. */
    CreateCourseRequest$.outboundSchema = exports.CreateCourseRequest$outboundSchema;
})(CreateCourseRequest$ || (exports.CreateCourseRequest$ = CreateCourseRequest$ = {}));
function createCourseRequestToJSON(createCourseRequest) {
    return JSON.stringify(exports.CreateCourseRequest$outboundSchema.parse(createCourseRequest));
}
function createCourseRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseRequest' from JSON`);
}
/** @internal */
exports.CreateCourseSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
exports.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.
 */
var CreateCourseSourcedIdPairs$;
(function (CreateCourseSourcedIdPairs$) {
    /** @deprecated use `CreateCourseSourcedIdPairs$inboundSchema` instead. */
    CreateCourseSourcedIdPairs$.inboundSchema = exports.CreateCourseSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateCourseSourcedIdPairs$outboundSchema` instead. */
    CreateCourseSourcedIdPairs$.outboundSchema = exports.CreateCourseSourcedIdPairs$outboundSchema;
})(CreateCourseSourcedIdPairs$ || (exports.CreateCourseSourcedIdPairs$ = CreateCourseSourcedIdPairs$ = {}));
function createCourseSourcedIdPairsToJSON(createCourseSourcedIdPairs) {
    return JSON.stringify(exports.CreateCourseSourcedIdPairs$outboundSchema.parse(createCourseSourcedIdPairs));
}
function createCourseSourcedIdPairsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseSourcedIdPairs' from JSON`);
}
/** @internal */
exports.CreateCourseResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateCourseSourcedIdPairs$inboundSchema),
});
/** @internal */
exports.CreateCourseResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateCourseSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateCourseResponse$;
(function (CreateCourseResponse$) {
    /** @deprecated use `CreateCourseResponse$inboundSchema` instead. */
    CreateCourseResponse$.inboundSchema = exports.CreateCourseResponse$inboundSchema;
    /** @deprecated use `CreateCourseResponse$outboundSchema` instead. */
    CreateCourseResponse$.outboundSchema = exports.CreateCourseResponse$outboundSchema;
})(CreateCourseResponse$ || (exports.CreateCourseResponse$ = CreateCourseResponse$ = {}));
function createCourseResponseToJSON(createCourseResponse) {
    return JSON.stringify(exports.CreateCourseResponse$outboundSchema.parse(createCourseResponse));
}
function createCourseResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseResponse' from JSON`);
}
//# sourceMappingURL=createcourse.js.map