/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateGradingPeriodStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const CreateGradingPeriodStatus$inboundSchema = z.nativeEnum(CreateGradingPeriodStatus);
/** @internal */
export const CreateGradingPeriodStatus$outboundSchema = CreateGradingPeriodStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateGradingPeriodStatus$;
(function (CreateGradingPeriodStatus$) {
    /** @deprecated use `CreateGradingPeriodStatus$inboundSchema` instead. */
    CreateGradingPeriodStatus$.inboundSchema = CreateGradingPeriodStatus$inboundSchema;
    /** @deprecated use `CreateGradingPeriodStatus$outboundSchema` instead. */
    CreateGradingPeriodStatus$.outboundSchema = CreateGradingPeriodStatus$outboundSchema;
})(CreateGradingPeriodStatus$ || (CreateGradingPeriodStatus$ = {}));
/** @internal */
export const CreateGradingPeriodParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateGradingPeriodParent$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 CreateGradingPeriodParent$;
(function (CreateGradingPeriodParent$) {
    /** @deprecated use `CreateGradingPeriodParent$inboundSchema` instead. */
    CreateGradingPeriodParent$.inboundSchema = CreateGradingPeriodParent$inboundSchema;
    /** @deprecated use `CreateGradingPeriodParent$outboundSchema` instead. */
    CreateGradingPeriodParent$.outboundSchema = CreateGradingPeriodParent$outboundSchema;
})(CreateGradingPeriodParent$ || (CreateGradingPeriodParent$ = {}));
export function createGradingPeriodParentToJSON(createGradingPeriodParent) {
    return JSON.stringify(CreateGradingPeriodParent$outboundSchema.parse(createGradingPeriodParent));
}
export function createGradingPeriodParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodParent' from JSON`);
}
/** @internal */
export const CreateGradingPeriodOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateGradingPeriodOrg$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 CreateGradingPeriodOrg$;
(function (CreateGradingPeriodOrg$) {
    /** @deprecated use `CreateGradingPeriodOrg$inboundSchema` instead. */
    CreateGradingPeriodOrg$.inboundSchema = CreateGradingPeriodOrg$inboundSchema;
    /** @deprecated use `CreateGradingPeriodOrg$outboundSchema` instead. */
    CreateGradingPeriodOrg$.outboundSchema = CreateGradingPeriodOrg$outboundSchema;
})(CreateGradingPeriodOrg$ || (CreateGradingPeriodOrg$ = {}));
export function createGradingPeriodOrgToJSON(createGradingPeriodOrg) {
    return JSON.stringify(CreateGradingPeriodOrg$outboundSchema.parse(createGradingPeriodOrg));
}
export function createGradingPeriodOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodOrg' from JSON`);
}
/** @internal */
export const CreateGradingPeriodAcademicSession$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateGradingPeriodStatus$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(() => CreateGradingPeriodParent$inboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => CreateGradingPeriodOrg$inboundSchema),
});
/** @internal */
export const CreateGradingPeriodAcademicSession$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateGradingPeriodStatus$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(() => CreateGradingPeriodParent$outboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => CreateGradingPeriodOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateGradingPeriodAcademicSession$;
(function (CreateGradingPeriodAcademicSession$) {
    /** @deprecated use `CreateGradingPeriodAcademicSession$inboundSchema` instead. */
    CreateGradingPeriodAcademicSession$.inboundSchema = CreateGradingPeriodAcademicSession$inboundSchema;
    /** @deprecated use `CreateGradingPeriodAcademicSession$outboundSchema` instead. */
    CreateGradingPeriodAcademicSession$.outboundSchema = CreateGradingPeriodAcademicSession$outboundSchema;
})(CreateGradingPeriodAcademicSession$ || (CreateGradingPeriodAcademicSession$ = {}));
export function createGradingPeriodAcademicSessionToJSON(createGradingPeriodAcademicSession) {
    return JSON.stringify(CreateGradingPeriodAcademicSession$outboundSchema.parse(createGradingPeriodAcademicSession));
}
export function createGradingPeriodAcademicSessionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodAcademicSession' from JSON`);
}
/** @internal */
export const CreateGradingPeriodRequest$inboundSchema = z.object({
    academicSession: z.lazy(() => CreateGradingPeriodAcademicSession$inboundSchema),
});
/** @internal */
export const CreateGradingPeriodRequest$outboundSchema = z.object({
    academicSession: z.lazy(() => CreateGradingPeriodAcademicSession$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateGradingPeriodRequest$;
(function (CreateGradingPeriodRequest$) {
    /** @deprecated use `CreateGradingPeriodRequest$inboundSchema` instead. */
    CreateGradingPeriodRequest$.inboundSchema = CreateGradingPeriodRequest$inboundSchema;
    /** @deprecated use `CreateGradingPeriodRequest$outboundSchema` instead. */
    CreateGradingPeriodRequest$.outboundSchema = CreateGradingPeriodRequest$outboundSchema;
})(CreateGradingPeriodRequest$ || (CreateGradingPeriodRequest$ = {}));
export function createGradingPeriodRequestToJSON(createGradingPeriodRequest) {
    return JSON.stringify(CreateGradingPeriodRequest$outboundSchema.parse(createGradingPeriodRequest));
}
export function createGradingPeriodRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodRequest' from JSON`);
}
/** @internal */
export const CreateGradingPeriodSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
export const CreateGradingPeriodSourcedIdPairs$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 CreateGradingPeriodSourcedIdPairs$;
(function (CreateGradingPeriodSourcedIdPairs$) {
    /** @deprecated use `CreateGradingPeriodSourcedIdPairs$inboundSchema` instead. */
    CreateGradingPeriodSourcedIdPairs$.inboundSchema = CreateGradingPeriodSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateGradingPeriodSourcedIdPairs$outboundSchema` instead. */
    CreateGradingPeriodSourcedIdPairs$.outboundSchema = CreateGradingPeriodSourcedIdPairs$outboundSchema;
})(CreateGradingPeriodSourcedIdPairs$ || (CreateGradingPeriodSourcedIdPairs$ = {}));
export function createGradingPeriodSourcedIdPairsToJSON(createGradingPeriodSourcedIdPairs) {
    return JSON.stringify(CreateGradingPeriodSourcedIdPairs$outboundSchema.parse(createGradingPeriodSourcedIdPairs));
}
export function createGradingPeriodSourcedIdPairsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodSourcedIdPairs' from JSON`);
}
/** @internal */
export const CreateGradingPeriodResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateGradingPeriodSourcedIdPairs$inboundSchema),
});
/** @internal */
export const CreateGradingPeriodResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateGradingPeriodSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateGradingPeriodResponse$;
(function (CreateGradingPeriodResponse$) {
    /** @deprecated use `CreateGradingPeriodResponse$inboundSchema` instead. */
    CreateGradingPeriodResponse$.inboundSchema = CreateGradingPeriodResponse$inboundSchema;
    /** @deprecated use `CreateGradingPeriodResponse$outboundSchema` instead. */
    CreateGradingPeriodResponse$.outboundSchema = CreateGradingPeriodResponse$outboundSchema;
})(CreateGradingPeriodResponse$ || (CreateGradingPeriodResponse$ = {}));
export function createGradingPeriodResponseToJSON(createGradingPeriodResponse) {
    return JSON.stringify(CreateGradingPeriodResponse$outboundSchema.parse(createGradingPeriodResponse));
}
export function createGradingPeriodResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateGradingPeriodResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodResponse' from JSON`);
}
//# sourceMappingURL=creategradingperiod.js.map