/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const PostAcademicSessionStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const PostAcademicSessionType = {
    GradingPeriod: "gradingPeriod",
    Semester: "semester",
    SchoolYear: "schoolYear",
    Term: "term",
};
/** @internal */
export const PostAcademicSessionStatus$inboundSchema = z.nativeEnum(PostAcademicSessionStatus);
/** @internal */
export const PostAcademicSessionStatus$outboundSchema = PostAcademicSessionStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PostAcademicSessionStatus$;
(function (PostAcademicSessionStatus$) {
    /** @deprecated use `PostAcademicSessionStatus$inboundSchema` instead. */
    PostAcademicSessionStatus$.inboundSchema = PostAcademicSessionStatus$inboundSchema;
    /** @deprecated use `PostAcademicSessionStatus$outboundSchema` instead. */
    PostAcademicSessionStatus$.outboundSchema = PostAcademicSessionStatus$outboundSchema;
})(PostAcademicSessionStatus$ || (PostAcademicSessionStatus$ = {}));
/** @internal */
export const PostAcademicSessionType$inboundSchema = z.nativeEnum(PostAcademicSessionType);
/** @internal */
export const PostAcademicSessionType$outboundSchema = PostAcademicSessionType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PostAcademicSessionType$;
(function (PostAcademicSessionType$) {
    /** @deprecated use `PostAcademicSessionType$inboundSchema` instead. */
    PostAcademicSessionType$.inboundSchema = PostAcademicSessionType$inboundSchema;
    /** @deprecated use `PostAcademicSessionType$outboundSchema` instead. */
    PostAcademicSessionType$.outboundSchema = PostAcademicSessionType$outboundSchema;
})(PostAcademicSessionType$ || (PostAcademicSessionType$ = {}));
/** @internal */
export const PostAcademicSessionParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PostAcademicSessionParent$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 PostAcademicSessionParent$;
(function (PostAcademicSessionParent$) {
    /** @deprecated use `PostAcademicSessionParent$inboundSchema` instead. */
    PostAcademicSessionParent$.inboundSchema = PostAcademicSessionParent$inboundSchema;
    /** @deprecated use `PostAcademicSessionParent$outboundSchema` instead. */
    PostAcademicSessionParent$.outboundSchema = PostAcademicSessionParent$outboundSchema;
})(PostAcademicSessionParent$ || (PostAcademicSessionParent$ = {}));
export function postAcademicSessionParentToJSON(postAcademicSessionParent) {
    return JSON.stringify(PostAcademicSessionParent$outboundSchema.parse(postAcademicSessionParent));
}
export function postAcademicSessionParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PostAcademicSessionParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostAcademicSessionParent' from JSON`);
}
/** @internal */
export const PostAcademicSessionOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PostAcademicSessionOrg$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 PostAcademicSessionOrg$;
(function (PostAcademicSessionOrg$) {
    /** @deprecated use `PostAcademicSessionOrg$inboundSchema` instead. */
    PostAcademicSessionOrg$.inboundSchema = PostAcademicSessionOrg$inboundSchema;
    /** @deprecated use `PostAcademicSessionOrg$outboundSchema` instead. */
    PostAcademicSessionOrg$.outboundSchema = PostAcademicSessionOrg$outboundSchema;
})(PostAcademicSessionOrg$ || (PostAcademicSessionOrg$ = {}));
export function postAcademicSessionOrgToJSON(postAcademicSessionOrg) {
    return JSON.stringify(PostAcademicSessionOrg$outboundSchema.parse(postAcademicSessionOrg));
}
export function postAcademicSessionOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PostAcademicSessionOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostAcademicSessionOrg' from JSON`);
}
/** @internal */
export const PostAcademicSessionAcademicSession$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: PostAcademicSessionStatus$inboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: PostAcademicSessionType$inboundSchema,
    parent: z.nullable(z.lazy(() => PostAcademicSessionParent$inboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => PostAcademicSessionOrg$inboundSchema),
});
/** @internal */
export const PostAcademicSessionAcademicSession$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: PostAcademicSessionStatus$outboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: PostAcademicSessionType$outboundSchema,
    parent: z.nullable(z.lazy(() => PostAcademicSessionParent$outboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => PostAcademicSessionOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PostAcademicSessionAcademicSession$;
(function (PostAcademicSessionAcademicSession$) {
    /** @deprecated use `PostAcademicSessionAcademicSession$inboundSchema` instead. */
    PostAcademicSessionAcademicSession$.inboundSchema = PostAcademicSessionAcademicSession$inboundSchema;
    /** @deprecated use `PostAcademicSessionAcademicSession$outboundSchema` instead. */
    PostAcademicSessionAcademicSession$.outboundSchema = PostAcademicSessionAcademicSession$outboundSchema;
})(PostAcademicSessionAcademicSession$ || (PostAcademicSessionAcademicSession$ = {}));
export function postAcademicSessionAcademicSessionToJSON(postAcademicSessionAcademicSession) {
    return JSON.stringify(PostAcademicSessionAcademicSession$outboundSchema.parse(postAcademicSessionAcademicSession));
}
export function postAcademicSessionAcademicSessionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PostAcademicSessionAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostAcademicSessionAcademicSession' from JSON`);
}
/** @internal */
export const PostAcademicSessionRequest$inboundSchema = z.object({
    academicSession: z.lazy(() => PostAcademicSessionAcademicSession$inboundSchema),
});
/** @internal */
export const PostAcademicSessionRequest$outboundSchema = z.object({
    academicSession: z.lazy(() => PostAcademicSessionAcademicSession$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PostAcademicSessionRequest$;
(function (PostAcademicSessionRequest$) {
    /** @deprecated use `PostAcademicSessionRequest$inboundSchema` instead. */
    PostAcademicSessionRequest$.inboundSchema = PostAcademicSessionRequest$inboundSchema;
    /** @deprecated use `PostAcademicSessionRequest$outboundSchema` instead. */
    PostAcademicSessionRequest$.outboundSchema = PostAcademicSessionRequest$outboundSchema;
})(PostAcademicSessionRequest$ || (PostAcademicSessionRequest$ = {}));
export function postAcademicSessionRequestToJSON(postAcademicSessionRequest) {
    return JSON.stringify(PostAcademicSessionRequest$outboundSchema.parse(postAcademicSessionRequest));
}
export function postAcademicSessionRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PostAcademicSessionRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostAcademicSessionRequest' from JSON`);
}
/** @internal */
export const PostAcademicSessionSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
export const PostAcademicSessionSourcedIdPairs$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.
 */
export var PostAcademicSessionSourcedIdPairs$;
(function (PostAcademicSessionSourcedIdPairs$) {
    /** @deprecated use `PostAcademicSessionSourcedIdPairs$inboundSchema` instead. */
    PostAcademicSessionSourcedIdPairs$.inboundSchema = PostAcademicSessionSourcedIdPairs$inboundSchema;
    /** @deprecated use `PostAcademicSessionSourcedIdPairs$outboundSchema` instead. */
    PostAcademicSessionSourcedIdPairs$.outboundSchema = PostAcademicSessionSourcedIdPairs$outboundSchema;
})(PostAcademicSessionSourcedIdPairs$ || (PostAcademicSessionSourcedIdPairs$ = {}));
export function postAcademicSessionSourcedIdPairsToJSON(postAcademicSessionSourcedIdPairs) {
    return JSON.stringify(PostAcademicSessionSourcedIdPairs$outboundSchema.parse(postAcademicSessionSourcedIdPairs));
}
export function postAcademicSessionSourcedIdPairsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PostAcademicSessionSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostAcademicSessionSourcedIdPairs' from JSON`);
}
/** @internal */
export const PostAcademicSessionResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => PostAcademicSessionSourcedIdPairs$inboundSchema),
});
/** @internal */
export const PostAcademicSessionResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => PostAcademicSessionSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PostAcademicSessionResponse$;
(function (PostAcademicSessionResponse$) {
    /** @deprecated use `PostAcademicSessionResponse$inboundSchema` instead. */
    PostAcademicSessionResponse$.inboundSchema = PostAcademicSessionResponse$inboundSchema;
    /** @deprecated use `PostAcademicSessionResponse$outboundSchema` instead. */
    PostAcademicSessionResponse$.outboundSchema = PostAcademicSessionResponse$outboundSchema;
})(PostAcademicSessionResponse$ || (PostAcademicSessionResponse$ = {}));
export function postAcademicSessionResponseToJSON(postAcademicSessionResponse) {
    return JSON.stringify(PostAcademicSessionResponse$outboundSchema.parse(postAcademicSessionResponse));
}
export function postAcademicSessionResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PostAcademicSessionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostAcademicSessionResponse' from JSON`);
}
//# sourceMappingURL=postacademicsession.js.map