/*
 * 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 UpdateGradingPeriodStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const UpdateGradingPeriodStatus$inboundSchema = z.nativeEnum(UpdateGradingPeriodStatus);
/** @internal */
export const UpdateGradingPeriodStatus$outboundSchema = UpdateGradingPeriodStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateGradingPeriodStatus$;
(function (UpdateGradingPeriodStatus$) {
    /** @deprecated use `UpdateGradingPeriodStatus$inboundSchema` instead. */
    UpdateGradingPeriodStatus$.inboundSchema = UpdateGradingPeriodStatus$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodStatus$outboundSchema` instead. */
    UpdateGradingPeriodStatus$.outboundSchema = UpdateGradingPeriodStatus$outboundSchema;
})(UpdateGradingPeriodStatus$ || (UpdateGradingPeriodStatus$ = {}));
/** @internal */
export const UpdateGradingPeriodParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const UpdateGradingPeriodParent$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 UpdateGradingPeriodParent$;
(function (UpdateGradingPeriodParent$) {
    /** @deprecated use `UpdateGradingPeriodParent$inboundSchema` instead. */
    UpdateGradingPeriodParent$.inboundSchema = UpdateGradingPeriodParent$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodParent$outboundSchema` instead. */
    UpdateGradingPeriodParent$.outboundSchema = UpdateGradingPeriodParent$outboundSchema;
})(UpdateGradingPeriodParent$ || (UpdateGradingPeriodParent$ = {}));
export function updateGradingPeriodParentToJSON(updateGradingPeriodParent) {
    return JSON.stringify(UpdateGradingPeriodParent$outboundSchema.parse(updateGradingPeriodParent));
}
export function updateGradingPeriodParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateGradingPeriodParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodParent' from JSON`);
}
/** @internal */
export const UpdateGradingPeriodOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const UpdateGradingPeriodOrg$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 UpdateGradingPeriodOrg$;
(function (UpdateGradingPeriodOrg$) {
    /** @deprecated use `UpdateGradingPeriodOrg$inboundSchema` instead. */
    UpdateGradingPeriodOrg$.inboundSchema = UpdateGradingPeriodOrg$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodOrg$outboundSchema` instead. */
    UpdateGradingPeriodOrg$.outboundSchema = UpdateGradingPeriodOrg$outboundSchema;
})(UpdateGradingPeriodOrg$ || (UpdateGradingPeriodOrg$ = {}));
export function updateGradingPeriodOrgToJSON(updateGradingPeriodOrg) {
    return JSON.stringify(UpdateGradingPeriodOrg$outboundSchema.parse(updateGradingPeriodOrg));
}
export function updateGradingPeriodOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateGradingPeriodOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodOrg' from JSON`);
}
/** @internal */
export const UpdateGradingPeriodAcademicSession$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: UpdateGradingPeriodStatus$inboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: z.literal("gradingPeriod").optional(),
    parent: z.nullable(z.lazy(() => UpdateGradingPeriodParent$inboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => UpdateGradingPeriodOrg$inboundSchema),
});
/** @internal */
export const UpdateGradingPeriodAcademicSession$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: UpdateGradingPeriodStatus$outboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: z.literal("gradingPeriod").default("gradingPeriod"),
    parent: z.nullable(z.lazy(() => UpdateGradingPeriodParent$outboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => UpdateGradingPeriodOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateGradingPeriodAcademicSession$;
(function (UpdateGradingPeriodAcademicSession$) {
    /** @deprecated use `UpdateGradingPeriodAcademicSession$inboundSchema` instead. */
    UpdateGradingPeriodAcademicSession$.inboundSchema = UpdateGradingPeriodAcademicSession$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodAcademicSession$outboundSchema` instead. */
    UpdateGradingPeriodAcademicSession$.outboundSchema = UpdateGradingPeriodAcademicSession$outboundSchema;
})(UpdateGradingPeriodAcademicSession$ || (UpdateGradingPeriodAcademicSession$ = {}));
export function updateGradingPeriodAcademicSessionToJSON(updateGradingPeriodAcademicSession) {
    return JSON.stringify(UpdateGradingPeriodAcademicSession$outboundSchema.parse(updateGradingPeriodAcademicSession));
}
export function updateGradingPeriodAcademicSessionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateGradingPeriodAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodAcademicSession' from JSON`);
}
/** @internal */
export const UpdateGradingPeriodRequestBody$inboundSchema = z.object({
    academicSession: z.lazy(() => UpdateGradingPeriodAcademicSession$inboundSchema),
});
/** @internal */
export const UpdateGradingPeriodRequestBody$outboundSchema = z.object({
    academicSession: z.lazy(() => UpdateGradingPeriodAcademicSession$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateGradingPeriodRequestBody$;
(function (UpdateGradingPeriodRequestBody$) {
    /** @deprecated use `UpdateGradingPeriodRequestBody$inboundSchema` instead. */
    UpdateGradingPeriodRequestBody$.inboundSchema = UpdateGradingPeriodRequestBody$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodRequestBody$outboundSchema` instead. */
    UpdateGradingPeriodRequestBody$.outboundSchema = UpdateGradingPeriodRequestBody$outboundSchema;
})(UpdateGradingPeriodRequestBody$ || (UpdateGradingPeriodRequestBody$ = {}));
export function updateGradingPeriodRequestBodyToJSON(updateGradingPeriodRequestBody) {
    return JSON.stringify(UpdateGradingPeriodRequestBody$outboundSchema.parse(updateGradingPeriodRequestBody));
}
export function updateGradingPeriodRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateGradingPeriodRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodRequestBody' from JSON`);
}
/** @internal */
export const UpdateGradingPeriodRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => UpdateGradingPeriodRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const UpdateGradingPeriodRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => UpdateGradingPeriodRequestBody$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 UpdateGradingPeriodRequest$;
(function (UpdateGradingPeriodRequest$) {
    /** @deprecated use `UpdateGradingPeriodRequest$inboundSchema` instead. */
    UpdateGradingPeriodRequest$.inboundSchema = UpdateGradingPeriodRequest$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodRequest$outboundSchema` instead. */
    UpdateGradingPeriodRequest$.outboundSchema = UpdateGradingPeriodRequest$outboundSchema;
})(UpdateGradingPeriodRequest$ || (UpdateGradingPeriodRequest$ = {}));
export function updateGradingPeriodRequestToJSON(updateGradingPeriodRequest) {
    return JSON.stringify(UpdateGradingPeriodRequest$outboundSchema.parse(updateGradingPeriodRequest));
}
export function updateGradingPeriodRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateGradingPeriodRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodRequest' from JSON`);
}
//# sourceMappingURL=updategradingperiod.js.map