/*
 * 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 GetGradingPeriodsForTermOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetGradingPeriodsForTermOrderBy$inboundSchema = z.nativeEnum(GetGradingPeriodsForTermOrderBy);
/** @internal */
export const GetGradingPeriodsForTermOrderBy$outboundSchema = GetGradingPeriodsForTermOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetGradingPeriodsForTermOrderBy$;
(function (GetGradingPeriodsForTermOrderBy$) {
    /** @deprecated use `GetGradingPeriodsForTermOrderBy$inboundSchema` instead. */
    GetGradingPeriodsForTermOrderBy$.inboundSchema = GetGradingPeriodsForTermOrderBy$inboundSchema;
    /** @deprecated use `GetGradingPeriodsForTermOrderBy$outboundSchema` instead. */
    GetGradingPeriodsForTermOrderBy$.outboundSchema = GetGradingPeriodsForTermOrderBy$outboundSchema;
})(GetGradingPeriodsForTermOrderBy$ || (GetGradingPeriodsForTermOrderBy$ = {}));
/** @internal */
export const GetGradingPeriodsForTermRequest$inboundSchema = z.object({
    termSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetGradingPeriodsForTermOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetGradingPeriodsForTermRequest$outboundSchema = z.object({
    termSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetGradingPeriodsForTermOrderBy$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 GetGradingPeriodsForTermRequest$;
(function (GetGradingPeriodsForTermRequest$) {
    /** @deprecated use `GetGradingPeriodsForTermRequest$inboundSchema` instead. */
    GetGradingPeriodsForTermRequest$.inboundSchema = GetGradingPeriodsForTermRequest$inboundSchema;
    /** @deprecated use `GetGradingPeriodsForTermRequest$outboundSchema` instead. */
    GetGradingPeriodsForTermRequest$.outboundSchema = GetGradingPeriodsForTermRequest$outboundSchema;
})(GetGradingPeriodsForTermRequest$ || (GetGradingPeriodsForTermRequest$ = {}));
export function getGradingPeriodsForTermRequestToJSON(getGradingPeriodsForTermRequest) {
    return JSON.stringify(GetGradingPeriodsForTermRequest$outboundSchema.parse(getGradingPeriodsForTermRequest));
}
export function getGradingPeriodsForTermRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetGradingPeriodsForTermRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetGradingPeriodsForTermRequest' from JSON`);
}
/** @internal */
export const GetGradingPeriodsForTermResponseBody$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 GetGradingPeriodsForTermResponseBody$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 GetGradingPeriodsForTermResponseBody$;
(function (GetGradingPeriodsForTermResponseBody$) {
    /** @deprecated use `GetGradingPeriodsForTermResponseBody$inboundSchema` instead. */
    GetGradingPeriodsForTermResponseBody$.inboundSchema = GetGradingPeriodsForTermResponseBody$inboundSchema;
    /** @deprecated use `GetGradingPeriodsForTermResponseBody$outboundSchema` instead. */
    GetGradingPeriodsForTermResponseBody$.outboundSchema = GetGradingPeriodsForTermResponseBody$outboundSchema;
})(GetGradingPeriodsForTermResponseBody$ || (GetGradingPeriodsForTermResponseBody$ = {}));
export function getGradingPeriodsForTermResponseBodyToJSON(getGradingPeriodsForTermResponseBody) {
    return JSON.stringify(GetGradingPeriodsForTermResponseBody$outboundSchema.parse(getGradingPeriodsForTermResponseBody));
}
export function getGradingPeriodsForTermResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetGradingPeriodsForTermResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetGradingPeriodsForTermResponseBody' from JSON`);
}
/** @internal */
export const GetGradingPeriodsForTermResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetGradingPeriodsForTermResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetGradingPeriodsForTermResponse$outboundSchema = z.object({
    result: z.lazy(() => GetGradingPeriodsForTermResponseBody$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 GetGradingPeriodsForTermResponse$;
(function (GetGradingPeriodsForTermResponse$) {
    /** @deprecated use `GetGradingPeriodsForTermResponse$inboundSchema` instead. */
    GetGradingPeriodsForTermResponse$.inboundSchema = GetGradingPeriodsForTermResponse$inboundSchema;
    /** @deprecated use `GetGradingPeriodsForTermResponse$outboundSchema` instead. */
    GetGradingPeriodsForTermResponse$.outboundSchema = GetGradingPeriodsForTermResponse$outboundSchema;
})(GetGradingPeriodsForTermResponse$ || (GetGradingPeriodsForTermResponse$ = {}));
export function getGradingPeriodsForTermResponseToJSON(getGradingPeriodsForTermResponse) {
    return JSON.stringify(GetGradingPeriodsForTermResponse$outboundSchema.parse(getGradingPeriodsForTermResponse));
}
export function getGradingPeriodsForTermResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetGradingPeriodsForTermResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetGradingPeriodsForTermResponse' from JSON`);
}
//# sourceMappingURL=getgradingperiodsforterm.js.map