/*
 * 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";
import * as components from "../components/index.js";
export const CreateGradingPeriodForTermStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const CreateGradingPeriodForTermStatus$inboundSchema = z.nativeEnum(CreateGradingPeriodForTermStatus);
/** @internal */
export const CreateGradingPeriodForTermStatus$outboundSchema = CreateGradingPeriodForTermStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateGradingPeriodForTermStatus$;
(function (CreateGradingPeriodForTermStatus$) {
    /** @deprecated use `CreateGradingPeriodForTermStatus$inboundSchema` instead. */
    CreateGradingPeriodForTermStatus$.inboundSchema = CreateGradingPeriodForTermStatus$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermStatus$outboundSchema` instead. */
    CreateGradingPeriodForTermStatus$.outboundSchema = CreateGradingPeriodForTermStatus$outboundSchema;
})(CreateGradingPeriodForTermStatus$ || (CreateGradingPeriodForTermStatus$ = {}));
/** @internal */
export const CreateGradingPeriodForTermParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateGradingPeriodForTermParent$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 CreateGradingPeriodForTermParent$;
(function (CreateGradingPeriodForTermParent$) {
    /** @deprecated use `CreateGradingPeriodForTermParent$inboundSchema` instead. */
    CreateGradingPeriodForTermParent$.inboundSchema = CreateGradingPeriodForTermParent$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermParent$outboundSchema` instead. */
    CreateGradingPeriodForTermParent$.outboundSchema = CreateGradingPeriodForTermParent$outboundSchema;
})(CreateGradingPeriodForTermParent$ || (CreateGradingPeriodForTermParent$ = {}));
export function createGradingPeriodForTermParentToJSON(createGradingPeriodForTermParent) {
    return JSON.stringify(CreateGradingPeriodForTermParent$outboundSchema.parse(createGradingPeriodForTermParent));
}
export function createGradingPeriodForTermParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodForTermParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermParent' from JSON`);
}
/** @internal */
export const CreateGradingPeriodForTermOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateGradingPeriodForTermOrg$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 CreateGradingPeriodForTermOrg$;
(function (CreateGradingPeriodForTermOrg$) {
    /** @deprecated use `CreateGradingPeriodForTermOrg$inboundSchema` instead. */
    CreateGradingPeriodForTermOrg$.inboundSchema = CreateGradingPeriodForTermOrg$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermOrg$outboundSchema` instead. */
    CreateGradingPeriodForTermOrg$.outboundSchema = CreateGradingPeriodForTermOrg$outboundSchema;
})(CreateGradingPeriodForTermOrg$ || (CreateGradingPeriodForTermOrg$ = {}));
export function createGradingPeriodForTermOrgToJSON(createGradingPeriodForTermOrg) {
    return JSON.stringify(CreateGradingPeriodForTermOrg$outboundSchema.parse(createGradingPeriodForTermOrg));
}
export function createGradingPeriodForTermOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodForTermOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermOrg' from JSON`);
}
/** @internal */
export const CreateGradingPeriodForTermAcademicSession$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateGradingPeriodForTermStatus$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(() => CreateGradingPeriodForTermParent$inboundSchema)).optional(),
    schoolYear: z.string(),
    org: z.lazy(() => CreateGradingPeriodForTermOrg$inboundSchema),
});
/** @internal */
export const CreateGradingPeriodForTermAcademicSession$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateGradingPeriodForTermStatus$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(() => CreateGradingPeriodForTermParent$outboundSchema)).optional(),
    schoolYear: z.string(),
    org: z.lazy(() => CreateGradingPeriodForTermOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateGradingPeriodForTermAcademicSession$;
(function (CreateGradingPeriodForTermAcademicSession$) {
    /** @deprecated use `CreateGradingPeriodForTermAcademicSession$inboundSchema` instead. */
    CreateGradingPeriodForTermAcademicSession$.inboundSchema = CreateGradingPeriodForTermAcademicSession$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermAcademicSession$outboundSchema` instead. */
    CreateGradingPeriodForTermAcademicSession$.outboundSchema = CreateGradingPeriodForTermAcademicSession$outboundSchema;
})(CreateGradingPeriodForTermAcademicSession$ || (CreateGradingPeriodForTermAcademicSession$ = {}));
export function createGradingPeriodForTermAcademicSessionToJSON(createGradingPeriodForTermAcademicSession) {
    return JSON.stringify(CreateGradingPeriodForTermAcademicSession$outboundSchema.parse(createGradingPeriodForTermAcademicSession));
}
export function createGradingPeriodForTermAcademicSessionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodForTermAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermAcademicSession' from JSON`);
}
/** @internal */
export const CreateGradingPeriodForTermRequestBody$inboundSchema = z.object({
    academicSession: z.lazy(() => CreateGradingPeriodForTermAcademicSession$inboundSchema),
});
/** @internal */
export const CreateGradingPeriodForTermRequestBody$outboundSchema = z.object({
    academicSession: z.lazy(() => CreateGradingPeriodForTermAcademicSession$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateGradingPeriodForTermRequestBody$;
(function (CreateGradingPeriodForTermRequestBody$) {
    /** @deprecated use `CreateGradingPeriodForTermRequestBody$inboundSchema` instead. */
    CreateGradingPeriodForTermRequestBody$.inboundSchema = CreateGradingPeriodForTermRequestBody$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermRequestBody$outboundSchema` instead. */
    CreateGradingPeriodForTermRequestBody$.outboundSchema = CreateGradingPeriodForTermRequestBody$outboundSchema;
})(CreateGradingPeriodForTermRequestBody$ || (CreateGradingPeriodForTermRequestBody$ = {}));
export function createGradingPeriodForTermRequestBodyToJSON(createGradingPeriodForTermRequestBody) {
    return JSON.stringify(CreateGradingPeriodForTermRequestBody$outboundSchema.parse(createGradingPeriodForTermRequestBody));
}
export function createGradingPeriodForTermRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodForTermRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermRequestBody' from JSON`);
}
/** @internal */
export const CreateGradingPeriodForTermRequest$inboundSchema = z.object({
    termSourcedId: z.string(),
    RequestBody: z.lazy(() => CreateGradingPeriodForTermRequestBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const CreateGradingPeriodForTermRequest$outboundSchema = z.object({
    termSourcedId: z.string(),
    requestBody: z.lazy(() => CreateGradingPeriodForTermRequestBody$outboundSchema),
}).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 CreateGradingPeriodForTermRequest$;
(function (CreateGradingPeriodForTermRequest$) {
    /** @deprecated use `CreateGradingPeriodForTermRequest$inboundSchema` instead. */
    CreateGradingPeriodForTermRequest$.inboundSchema = CreateGradingPeriodForTermRequest$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermRequest$outboundSchema` instead. */
    CreateGradingPeriodForTermRequest$.outboundSchema = CreateGradingPeriodForTermRequest$outboundSchema;
})(CreateGradingPeriodForTermRequest$ || (CreateGradingPeriodForTermRequest$ = {}));
export function createGradingPeriodForTermRequestToJSON(createGradingPeriodForTermRequest) {
    return JSON.stringify(CreateGradingPeriodForTermRequest$outboundSchema.parse(createGradingPeriodForTermRequest));
}
export function createGradingPeriodForTermRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodForTermRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermRequest' from JSON`);
}
/** @internal */
export const CreateGradingPeriodForTermResponse$inboundSchema = z.object({
    academicSession: components.AcademicSession$inboundSchema,
});
/** @internal */
export const CreateGradingPeriodForTermResponse$outboundSchema = z.object({
    academicSession: components.AcademicSession$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateGradingPeriodForTermResponse$;
(function (CreateGradingPeriodForTermResponse$) {
    /** @deprecated use `CreateGradingPeriodForTermResponse$inboundSchema` instead. */
    CreateGradingPeriodForTermResponse$.inboundSchema = CreateGradingPeriodForTermResponse$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermResponse$outboundSchema` instead. */
    CreateGradingPeriodForTermResponse$.outboundSchema = CreateGradingPeriodForTermResponse$outboundSchema;
})(CreateGradingPeriodForTermResponse$ || (CreateGradingPeriodForTermResponse$ = {}));
export function createGradingPeriodForTermResponseToJSON(createGradingPeriodForTermResponse) {
    return JSON.stringify(CreateGradingPeriodForTermResponse$outboundSchema.parse(createGradingPeriodForTermResponse));
}
export function createGradingPeriodForTermResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodForTermResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermResponse' from JSON`);
}
//# sourceMappingURL=creategradingperiodforterm.js.map