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