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