/*
 * 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";
/**
 * The order to sort the response by
 */
export const GetAllGradingPeriodsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllGradingPeriodsOrderBy$inboundSchema = z.nativeEnum(GetAllGradingPeriodsOrderBy);
/** @internal */
export const GetAllGradingPeriodsOrderBy$outboundSchema = GetAllGradingPeriodsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllGradingPeriodsOrderBy$;
(function (GetAllGradingPeriodsOrderBy$) {
    /** @deprecated use `GetAllGradingPeriodsOrderBy$inboundSchema` instead. */
    GetAllGradingPeriodsOrderBy$.inboundSchema = GetAllGradingPeriodsOrderBy$inboundSchema;
    /** @deprecated use `GetAllGradingPeriodsOrderBy$outboundSchema` instead. */
    GetAllGradingPeriodsOrderBy$.outboundSchema = GetAllGradingPeriodsOrderBy$outboundSchema;
})(GetAllGradingPeriodsOrderBy$ || (GetAllGradingPeriodsOrderBy$ = {}));
/** @internal */
export const GetAllGradingPeriodsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllGradingPeriodsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllGradingPeriodsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllGradingPeriodsOrderBy$outboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllGradingPeriodsRequest$;
(function (GetAllGradingPeriodsRequest$) {
    /** @deprecated use `GetAllGradingPeriodsRequest$inboundSchema` instead. */
    GetAllGradingPeriodsRequest$.inboundSchema = GetAllGradingPeriodsRequest$inboundSchema;
    /** @deprecated use `GetAllGradingPeriodsRequest$outboundSchema` instead. */
    GetAllGradingPeriodsRequest$.outboundSchema = GetAllGradingPeriodsRequest$outboundSchema;
})(GetAllGradingPeriodsRequest$ || (GetAllGradingPeriodsRequest$ = {}));
export function getAllGradingPeriodsRequestToJSON(getAllGradingPeriodsRequest) {
    return JSON.stringify(GetAllGradingPeriodsRequest$outboundSchema.parse(getAllGradingPeriodsRequest));
}
export function getAllGradingPeriodsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllGradingPeriodsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllGradingPeriodsRequest' from JSON`);
}
/** @internal */
export const GetAllGradingPeriodsResponseBody$inboundSchema = z.object({
    gradingPeriods: z.array(components.AcademicSession$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetAllGradingPeriodsResponseBody$outboundSchema = z.object({
    gradingPeriods: z.array(components.AcademicSession$outboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllGradingPeriodsResponseBody$;
(function (GetAllGradingPeriodsResponseBody$) {
    /** @deprecated use `GetAllGradingPeriodsResponseBody$inboundSchema` instead. */
    GetAllGradingPeriodsResponseBody$.inboundSchema = GetAllGradingPeriodsResponseBody$inboundSchema;
    /** @deprecated use `GetAllGradingPeriodsResponseBody$outboundSchema` instead. */
    GetAllGradingPeriodsResponseBody$.outboundSchema = GetAllGradingPeriodsResponseBody$outboundSchema;
})(GetAllGradingPeriodsResponseBody$ || (GetAllGradingPeriodsResponseBody$ = {}));
export function getAllGradingPeriodsResponseBodyToJSON(getAllGradingPeriodsResponseBody) {
    return JSON.stringify(GetAllGradingPeriodsResponseBody$outboundSchema.parse(getAllGradingPeriodsResponseBody));
}
export function getAllGradingPeriodsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllGradingPeriodsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllGradingPeriodsResponseBody' from JSON`);
}
/** @internal */
export const GetAllGradingPeriodsResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllGradingPeriodsResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllGradingPeriodsResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllGradingPeriodsResponseBody$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        result: "Result",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllGradingPeriodsResponse$;
(function (GetAllGradingPeriodsResponse$) {
    /** @deprecated use `GetAllGradingPeriodsResponse$inboundSchema` instead. */
    GetAllGradingPeriodsResponse$.inboundSchema = GetAllGradingPeriodsResponse$inboundSchema;
    /** @deprecated use `GetAllGradingPeriodsResponse$outboundSchema` instead. */
    GetAllGradingPeriodsResponse$.outboundSchema = GetAllGradingPeriodsResponse$outboundSchema;
})(GetAllGradingPeriodsResponse$ || (GetAllGradingPeriodsResponse$ = {}));
export function getAllGradingPeriodsResponseToJSON(getAllGradingPeriodsResponse) {
    return JSON.stringify(GetAllGradingPeriodsResponse$outboundSchema.parse(getAllGradingPeriodsResponse));
}
export function getAllGradingPeriodsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllGradingPeriodsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllGradingPeriodsResponse' from JSON`);
}
//# sourceMappingURL=getallgradingperiods.js.map