"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.AcademicSession$ = exports.AcademicSession$outboundSchema = exports.AcademicSession$inboundSchema = exports.AcademicSessionOrg$ = exports.AcademicSessionOrg$outboundSchema = exports.AcademicSessionOrg$inboundSchema = exports.OrgType2$ = exports.OrgType2$outboundSchema = exports.OrgType2$inboundSchema = exports.AcademicSessionParent$ = exports.AcademicSessionParent$outboundSchema = exports.AcademicSessionParent$inboundSchema = exports.ParentType$ = exports.ParentType$outboundSchema = exports.ParentType$inboundSchema = exports.AcademicSessionType$ = exports.AcademicSessionType$outboundSchema = exports.AcademicSessionType$inboundSchema = exports.AcademicSessionStatus$ = exports.AcademicSessionStatus$outboundSchema = exports.AcademicSessionStatus$inboundSchema = exports.OrgType2 = exports.ParentType = exports.AcademicSessionType = exports.AcademicSessionStatus = void 0;
exports.academicSessionParentToJSON = academicSessionParentToJSON;
exports.academicSessionParentFromJSON = academicSessionParentFromJSON;
exports.academicSessionOrgToJSON = academicSessionOrgToJSON;
exports.academicSessionOrgFromJSON = academicSessionOrgFromJSON;
exports.academicSessionToJSON = academicSessionToJSON;
exports.academicSessionFromJSON = academicSessionFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.AcademicSessionStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
exports.AcademicSessionType = {
    GradingPeriod: "gradingPeriod",
    Semester: "semester",
    SchoolYear: "schoolYear",
    Term: "term",
};
exports.ParentType = {
    AcademicSession: "academicSession",
    AssessmentLineItem: "assessmentLineItem",
    Category: "category",
    Class: "class",
    Course: "course",
    Demographics: "demographics",
    Enrollment: "enrollment",
    GradingPeriod: "gradingPeriod",
    LineItem: "lineItem",
    Org: "org",
    Resource: "resource",
    Result: "result",
    ScoreScale: "scoreScale",
    Student: "student",
    Teacher: "teacher",
    Term: "term",
    User: "user",
    ComponentResource: "componentResource",
    CourseComponent: "courseComponent",
};
exports.OrgType2 = {
    AcademicSession: "academicSession",
    AssessmentLineItem: "assessmentLineItem",
    Category: "category",
    Class: "class",
    Course: "course",
    Demographics: "demographics",
    Enrollment: "enrollment",
    GradingPeriod: "gradingPeriod",
    LineItem: "lineItem",
    Org: "org",
    Resource: "resource",
    Result: "result",
    ScoreScale: "scoreScale",
    Student: "student",
    Teacher: "teacher",
    Term: "term",
    User: "user",
    ComponentResource: "componentResource",
    CourseComponent: "courseComponent",
};
/** @internal */
exports.AcademicSessionStatus$inboundSchema = z.nativeEnum(exports.AcademicSessionStatus);
/** @internal */
exports.AcademicSessionStatus$outboundSchema = exports.AcademicSessionStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AcademicSessionStatus$;
(function (AcademicSessionStatus$) {
    /** @deprecated use `AcademicSessionStatus$inboundSchema` instead. */
    AcademicSessionStatus$.inboundSchema = exports.AcademicSessionStatus$inboundSchema;
    /** @deprecated use `AcademicSessionStatus$outboundSchema` instead. */
    AcademicSessionStatus$.outboundSchema = exports.AcademicSessionStatus$outboundSchema;
})(AcademicSessionStatus$ || (exports.AcademicSessionStatus$ = AcademicSessionStatus$ = {}));
/** @internal */
exports.AcademicSessionType$inboundSchema = z.nativeEnum(exports.AcademicSessionType);
/** @internal */
exports.AcademicSessionType$outboundSchema = exports.AcademicSessionType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AcademicSessionType$;
(function (AcademicSessionType$) {
    /** @deprecated use `AcademicSessionType$inboundSchema` instead. */
    AcademicSessionType$.inboundSchema = exports.AcademicSessionType$inboundSchema;
    /** @deprecated use `AcademicSessionType$outboundSchema` instead. */
    AcademicSessionType$.outboundSchema = exports.AcademicSessionType$outboundSchema;
})(AcademicSessionType$ || (exports.AcademicSessionType$ = AcademicSessionType$ = {}));
/** @internal */
exports.ParentType$inboundSchema = z
    .nativeEnum(exports.ParentType);
/** @internal */
exports.ParentType$outboundSchema = exports.ParentType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ParentType$;
(function (ParentType$) {
    /** @deprecated use `ParentType$inboundSchema` instead. */
    ParentType$.inboundSchema = exports.ParentType$inboundSchema;
    /** @deprecated use `ParentType$outboundSchema` instead. */
    ParentType$.outboundSchema = exports.ParentType$outboundSchema;
})(ParentType$ || (exports.ParentType$ = ParentType$ = {}));
/** @internal */
exports.AcademicSessionParent$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: exports.ParentType$inboundSchema,
});
/** @internal */
exports.AcademicSessionParent$outboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: exports.ParentType$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AcademicSessionParent$;
(function (AcademicSessionParent$) {
    /** @deprecated use `AcademicSessionParent$inboundSchema` instead. */
    AcademicSessionParent$.inboundSchema = exports.AcademicSessionParent$inboundSchema;
    /** @deprecated use `AcademicSessionParent$outboundSchema` instead. */
    AcademicSessionParent$.outboundSchema = exports.AcademicSessionParent$outboundSchema;
})(AcademicSessionParent$ || (exports.AcademicSessionParent$ = AcademicSessionParent$ = {}));
function academicSessionParentToJSON(academicSessionParent) {
    return JSON.stringify(exports.AcademicSessionParent$outboundSchema.parse(academicSessionParent));
}
function academicSessionParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AcademicSessionParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AcademicSessionParent' from JSON`);
}
/** @internal */
exports.OrgType2$inboundSchema = z
    .nativeEnum(exports.OrgType2);
/** @internal */
exports.OrgType2$outboundSchema = exports.OrgType2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var OrgType2$;
(function (OrgType2$) {
    /** @deprecated use `OrgType2$inboundSchema` instead. */
    OrgType2$.inboundSchema = exports.OrgType2$inboundSchema;
    /** @deprecated use `OrgType2$outboundSchema` instead. */
    OrgType2$.outboundSchema = exports.OrgType2$outboundSchema;
})(OrgType2$ || (exports.OrgType2$ = OrgType2$ = {}));
/** @internal */
exports.AcademicSessionOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: exports.OrgType2$inboundSchema,
});
/** @internal */
exports.AcademicSessionOrg$outboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: exports.OrgType2$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AcademicSessionOrg$;
(function (AcademicSessionOrg$) {
    /** @deprecated use `AcademicSessionOrg$inboundSchema` instead. */
    AcademicSessionOrg$.inboundSchema = exports.AcademicSessionOrg$inboundSchema;
    /** @deprecated use `AcademicSessionOrg$outboundSchema` instead. */
    AcademicSessionOrg$.outboundSchema = exports.AcademicSessionOrg$outboundSchema;
})(AcademicSessionOrg$ || (exports.AcademicSessionOrg$ = AcademicSessionOrg$ = {}));
function academicSessionOrgToJSON(academicSessionOrg) {
    return JSON.stringify(exports.AcademicSessionOrg$outboundSchema.parse(academicSessionOrg));
}
function academicSessionOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AcademicSessionOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AcademicSessionOrg' from JSON`);
}
/** @internal */
exports.AcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
    status: exports.AcademicSessionStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: exports.AcademicSessionType$inboundSchema,
    parent: z.nullable(z.lazy(() => exports.AcademicSessionParent$inboundSchema))
        .optional(),
    schoolYear: z.number(),
    org: z.lazy(() => exports.AcademicSessionOrg$inboundSchema),
});
/** @internal */
exports.AcademicSession$outboundSchema = z.object({
    sourcedId: z.string(),
    status: exports.AcademicSessionStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: exports.AcademicSessionType$outboundSchema,
    parent: z.nullable(z.lazy(() => exports.AcademicSessionParent$outboundSchema))
        .optional(),
    schoolYear: z.number(),
    org: z.lazy(() => exports.AcademicSessionOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AcademicSession$;
(function (AcademicSession$) {
    /** @deprecated use `AcademicSession$inboundSchema` instead. */
    AcademicSession$.inboundSchema = exports.AcademicSession$inboundSchema;
    /** @deprecated use `AcademicSession$outboundSchema` instead. */
    AcademicSession$.outboundSchema = exports.AcademicSession$outboundSchema;
})(AcademicSession$ || (exports.AcademicSession$ = AcademicSession$ = {}));
function academicSessionToJSON(academicSession) {
    return JSON.stringify(exports.AcademicSession$outboundSchema.parse(academicSession));
}
function academicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AcademicSession' from JSON`);
}
//# sourceMappingURL=academicsession.js.map