"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.PutAcademicSessionRequest$ = exports.PutAcademicSessionRequest$outboundSchema = exports.PutAcademicSessionRequest$inboundSchema = exports.PutAcademicSessionRequestBody$ = exports.PutAcademicSessionRequestBody$outboundSchema = exports.PutAcademicSessionRequestBody$inboundSchema = exports.PutAcademicSessionAcademicSession$ = exports.PutAcademicSessionAcademicSession$outboundSchema = exports.PutAcademicSessionAcademicSession$inboundSchema = exports.PutAcademicSessionOrg$ = exports.PutAcademicSessionOrg$outboundSchema = exports.PutAcademicSessionOrg$inboundSchema = exports.PutAcademicSessionParent$ = exports.PutAcademicSessionParent$outboundSchema = exports.PutAcademicSessionParent$inboundSchema = exports.PutAcademicSessionType$ = exports.PutAcademicSessionType$outboundSchema = exports.PutAcademicSessionType$inboundSchema = exports.PutAcademicSessionStatus$ = exports.PutAcademicSessionStatus$outboundSchema = exports.PutAcademicSessionStatus$inboundSchema = exports.PutAcademicSessionType = exports.PutAcademicSessionStatus = void 0;
exports.putAcademicSessionParentToJSON = putAcademicSessionParentToJSON;
exports.putAcademicSessionParentFromJSON = putAcademicSessionParentFromJSON;
exports.putAcademicSessionOrgToJSON = putAcademicSessionOrgToJSON;
exports.putAcademicSessionOrgFromJSON = putAcademicSessionOrgFromJSON;
exports.putAcademicSessionAcademicSessionToJSON = putAcademicSessionAcademicSessionToJSON;
exports.putAcademicSessionAcademicSessionFromJSON = putAcademicSessionAcademicSessionFromJSON;
exports.putAcademicSessionRequestBodyToJSON = putAcademicSessionRequestBodyToJSON;
exports.putAcademicSessionRequestBodyFromJSON = putAcademicSessionRequestBodyFromJSON;
exports.putAcademicSessionRequestToJSON = putAcademicSessionRequestToJSON;
exports.putAcademicSessionRequestFromJSON = putAcademicSessionRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.PutAcademicSessionStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
exports.PutAcademicSessionType = {
    GradingPeriod: "gradingPeriod",
    Semester: "semester",
    SchoolYear: "schoolYear",
    Term: "term",
};
/** @internal */
exports.PutAcademicSessionStatus$inboundSchema = z.nativeEnum(exports.PutAcademicSessionStatus);
/** @internal */
exports.PutAcademicSessionStatus$outboundSchema = exports.PutAcademicSessionStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutAcademicSessionStatus$;
(function (PutAcademicSessionStatus$) {
    /** @deprecated use `PutAcademicSessionStatus$inboundSchema` instead. */
    PutAcademicSessionStatus$.inboundSchema = exports.PutAcademicSessionStatus$inboundSchema;
    /** @deprecated use `PutAcademicSessionStatus$outboundSchema` instead. */
    PutAcademicSessionStatus$.outboundSchema = exports.PutAcademicSessionStatus$outboundSchema;
})(PutAcademicSessionStatus$ || (exports.PutAcademicSessionStatus$ = PutAcademicSessionStatus$ = {}));
/** @internal */
exports.PutAcademicSessionType$inboundSchema = z.nativeEnum(exports.PutAcademicSessionType);
/** @internal */
exports.PutAcademicSessionType$outboundSchema = exports.PutAcademicSessionType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutAcademicSessionType$;
(function (PutAcademicSessionType$) {
    /** @deprecated use `PutAcademicSessionType$inboundSchema` instead. */
    PutAcademicSessionType$.inboundSchema = exports.PutAcademicSessionType$inboundSchema;
    /** @deprecated use `PutAcademicSessionType$outboundSchema` instead. */
    PutAcademicSessionType$.outboundSchema = exports.PutAcademicSessionType$outboundSchema;
})(PutAcademicSessionType$ || (exports.PutAcademicSessionType$ = PutAcademicSessionType$ = {}));
/** @internal */
exports.PutAcademicSessionParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.PutAcademicSessionParent$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 PutAcademicSessionParent$;
(function (PutAcademicSessionParent$) {
    /** @deprecated use `PutAcademicSessionParent$inboundSchema` instead. */
    PutAcademicSessionParent$.inboundSchema = exports.PutAcademicSessionParent$inboundSchema;
    /** @deprecated use `PutAcademicSessionParent$outboundSchema` instead. */
    PutAcademicSessionParent$.outboundSchema = exports.PutAcademicSessionParent$outboundSchema;
})(PutAcademicSessionParent$ || (exports.PutAcademicSessionParent$ = PutAcademicSessionParent$ = {}));
function putAcademicSessionParentToJSON(putAcademicSessionParent) {
    return JSON.stringify(exports.PutAcademicSessionParent$outboundSchema.parse(putAcademicSessionParent));
}
function putAcademicSessionParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutAcademicSessionParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutAcademicSessionParent' from JSON`);
}
/** @internal */
exports.PutAcademicSessionOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.PutAcademicSessionOrg$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 PutAcademicSessionOrg$;
(function (PutAcademicSessionOrg$) {
    /** @deprecated use `PutAcademicSessionOrg$inboundSchema` instead. */
    PutAcademicSessionOrg$.inboundSchema = exports.PutAcademicSessionOrg$inboundSchema;
    /** @deprecated use `PutAcademicSessionOrg$outboundSchema` instead. */
    PutAcademicSessionOrg$.outboundSchema = exports.PutAcademicSessionOrg$outboundSchema;
})(PutAcademicSessionOrg$ || (exports.PutAcademicSessionOrg$ = PutAcademicSessionOrg$ = {}));
function putAcademicSessionOrgToJSON(putAcademicSessionOrg) {
    return JSON.stringify(exports.PutAcademicSessionOrg$outboundSchema.parse(putAcademicSessionOrg));
}
function putAcademicSessionOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutAcademicSessionOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutAcademicSessionOrg' from JSON`);
}
/** @internal */
exports.PutAcademicSessionAcademicSession$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.PutAcademicSessionStatus$inboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: exports.PutAcademicSessionType$inboundSchema,
    parent: z.nullable(z.lazy(() => exports.PutAcademicSessionParent$inboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => exports.PutAcademicSessionOrg$inboundSchema),
});
/** @internal */
exports.PutAcademicSessionAcademicSession$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.PutAcademicSessionStatus$outboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: exports.PutAcademicSessionType$outboundSchema,
    parent: z.nullable(z.lazy(() => exports.PutAcademicSessionParent$outboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => exports.PutAcademicSessionOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutAcademicSessionAcademicSession$;
(function (PutAcademicSessionAcademicSession$) {
    /** @deprecated use `PutAcademicSessionAcademicSession$inboundSchema` instead. */
    PutAcademicSessionAcademicSession$.inboundSchema = exports.PutAcademicSessionAcademicSession$inboundSchema;
    /** @deprecated use `PutAcademicSessionAcademicSession$outboundSchema` instead. */
    PutAcademicSessionAcademicSession$.outboundSchema = exports.PutAcademicSessionAcademicSession$outboundSchema;
})(PutAcademicSessionAcademicSession$ || (exports.PutAcademicSessionAcademicSession$ = PutAcademicSessionAcademicSession$ = {}));
function putAcademicSessionAcademicSessionToJSON(putAcademicSessionAcademicSession) {
    return JSON.stringify(exports.PutAcademicSessionAcademicSession$outboundSchema.parse(putAcademicSessionAcademicSession));
}
function putAcademicSessionAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutAcademicSessionAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutAcademicSessionAcademicSession' from JSON`);
}
/** @internal */
exports.PutAcademicSessionRequestBody$inboundSchema = z.object({
    academicSession: z.lazy(() => exports.PutAcademicSessionAcademicSession$inboundSchema),
});
/** @internal */
exports.PutAcademicSessionRequestBody$outboundSchema = z.object({
    academicSession: z.lazy(() => exports.PutAcademicSessionAcademicSession$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutAcademicSessionRequestBody$;
(function (PutAcademicSessionRequestBody$) {
    /** @deprecated use `PutAcademicSessionRequestBody$inboundSchema` instead. */
    PutAcademicSessionRequestBody$.inboundSchema = exports.PutAcademicSessionRequestBody$inboundSchema;
    /** @deprecated use `PutAcademicSessionRequestBody$outboundSchema` instead. */
    PutAcademicSessionRequestBody$.outboundSchema = exports.PutAcademicSessionRequestBody$outboundSchema;
})(PutAcademicSessionRequestBody$ || (exports.PutAcademicSessionRequestBody$ = PutAcademicSessionRequestBody$ = {}));
function putAcademicSessionRequestBodyToJSON(putAcademicSessionRequestBody) {
    return JSON.stringify(exports.PutAcademicSessionRequestBody$outboundSchema.parse(putAcademicSessionRequestBody));
}
function putAcademicSessionRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutAcademicSessionRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutAcademicSessionRequestBody' from JSON`);
}
/** @internal */
exports.PutAcademicSessionRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => exports.PutAcademicSessionRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.PutAcademicSessionRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => exports.PutAcademicSessionRequestBody$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 PutAcademicSessionRequest$;
(function (PutAcademicSessionRequest$) {
    /** @deprecated use `PutAcademicSessionRequest$inboundSchema` instead. */
    PutAcademicSessionRequest$.inboundSchema = exports.PutAcademicSessionRequest$inboundSchema;
    /** @deprecated use `PutAcademicSessionRequest$outboundSchema` instead. */
    PutAcademicSessionRequest$.outboundSchema = exports.PutAcademicSessionRequest$outboundSchema;
})(PutAcademicSessionRequest$ || (exports.PutAcademicSessionRequest$ = PutAcademicSessionRequest$ = {}));
function putAcademicSessionRequestToJSON(putAcademicSessionRequest) {
    return JSON.stringify(exports.PutAcademicSessionRequest$outboundSchema.parse(putAcademicSessionRequest));
}
function putAcademicSessionRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutAcademicSessionRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutAcademicSessionRequest' from JSON`);
}
//# sourceMappingURL=putacademicsession.js.map