/*
 * 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 GetTermsForSchoolOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetTermsForSchoolOrderBy$inboundSchema = z.nativeEnum(GetTermsForSchoolOrderBy);
/** @internal */
export const GetTermsForSchoolOrderBy$outboundSchema = GetTermsForSchoolOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetTermsForSchoolOrderBy$;
(function (GetTermsForSchoolOrderBy$) {
    /** @deprecated use `GetTermsForSchoolOrderBy$inboundSchema` instead. */
    GetTermsForSchoolOrderBy$.inboundSchema = GetTermsForSchoolOrderBy$inboundSchema;
    /** @deprecated use `GetTermsForSchoolOrderBy$outboundSchema` instead. */
    GetTermsForSchoolOrderBy$.outboundSchema = GetTermsForSchoolOrderBy$outboundSchema;
})(GetTermsForSchoolOrderBy$ || (GetTermsForSchoolOrderBy$ = {}));
/** @internal */
export const GetTermsForSchoolRequest$inboundSchema = z.object({
    schoolSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetTermsForSchoolOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetTermsForSchoolRequest$outboundSchema = z.object({
    schoolSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetTermsForSchoolOrderBy$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 GetTermsForSchoolRequest$;
(function (GetTermsForSchoolRequest$) {
    /** @deprecated use `GetTermsForSchoolRequest$inboundSchema` instead. */
    GetTermsForSchoolRequest$.inboundSchema = GetTermsForSchoolRequest$inboundSchema;
    /** @deprecated use `GetTermsForSchoolRequest$outboundSchema` instead. */
    GetTermsForSchoolRequest$.outboundSchema = GetTermsForSchoolRequest$outboundSchema;
})(GetTermsForSchoolRequest$ || (GetTermsForSchoolRequest$ = {}));
export function getTermsForSchoolRequestToJSON(getTermsForSchoolRequest) {
    return JSON.stringify(GetTermsForSchoolRequest$outboundSchema.parse(getTermsForSchoolRequest));
}
export function getTermsForSchoolRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTermsForSchoolRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTermsForSchoolRequest' from JSON`);
}
/** @internal */
export const GetTermsForSchoolResponseBody$inboundSchema = z.object({
    terms: z.array(components.AcademicSession$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetTermsForSchoolResponseBody$outboundSchema = z.object({
    terms: 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 GetTermsForSchoolResponseBody$;
(function (GetTermsForSchoolResponseBody$) {
    /** @deprecated use `GetTermsForSchoolResponseBody$inboundSchema` instead. */
    GetTermsForSchoolResponseBody$.inboundSchema = GetTermsForSchoolResponseBody$inboundSchema;
    /** @deprecated use `GetTermsForSchoolResponseBody$outboundSchema` instead. */
    GetTermsForSchoolResponseBody$.outboundSchema = GetTermsForSchoolResponseBody$outboundSchema;
})(GetTermsForSchoolResponseBody$ || (GetTermsForSchoolResponseBody$ = {}));
export function getTermsForSchoolResponseBodyToJSON(getTermsForSchoolResponseBody) {
    return JSON.stringify(GetTermsForSchoolResponseBody$outboundSchema.parse(getTermsForSchoolResponseBody));
}
export function getTermsForSchoolResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTermsForSchoolResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTermsForSchoolResponseBody' from JSON`);
}
/** @internal */
export const GetTermsForSchoolResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetTermsForSchoolResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetTermsForSchoolResponse$outboundSchema = z.object({
    result: z.lazy(() => GetTermsForSchoolResponseBody$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 GetTermsForSchoolResponse$;
(function (GetTermsForSchoolResponse$) {
    /** @deprecated use `GetTermsForSchoolResponse$inboundSchema` instead. */
    GetTermsForSchoolResponse$.inboundSchema = GetTermsForSchoolResponse$inboundSchema;
    /** @deprecated use `GetTermsForSchoolResponse$outboundSchema` instead. */
    GetTermsForSchoolResponse$.outboundSchema = GetTermsForSchoolResponse$outboundSchema;
})(GetTermsForSchoolResponse$ || (GetTermsForSchoolResponse$ = {}));
export function getTermsForSchoolResponseToJSON(getTermsForSchoolResponse) {
    return JSON.stringify(GetTermsForSchoolResponse$outboundSchema.parse(getTermsForSchoolResponse));
}
export function getTermsForSchoolResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetTermsForSchoolResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTermsForSchoolResponse' from JSON`);
}
//# sourceMappingURL=gettermsforschool.js.map