/*
 * 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 GetAllTermsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllTermsOrderBy$inboundSchema = z.nativeEnum(GetAllTermsOrderBy);
/** @internal */
export const GetAllTermsOrderBy$outboundSchema = GetAllTermsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllTermsOrderBy$;
(function (GetAllTermsOrderBy$) {
    /** @deprecated use `GetAllTermsOrderBy$inboundSchema` instead. */
    GetAllTermsOrderBy$.inboundSchema = GetAllTermsOrderBy$inboundSchema;
    /** @deprecated use `GetAllTermsOrderBy$outboundSchema` instead. */
    GetAllTermsOrderBy$.outboundSchema = GetAllTermsOrderBy$outboundSchema;
})(GetAllTermsOrderBy$ || (GetAllTermsOrderBy$ = {}));
/** @internal */
export const GetAllTermsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllTermsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllTermsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllTermsOrderBy$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 GetAllTermsRequest$;
(function (GetAllTermsRequest$) {
    /** @deprecated use `GetAllTermsRequest$inboundSchema` instead. */
    GetAllTermsRequest$.inboundSchema = GetAllTermsRequest$inboundSchema;
    /** @deprecated use `GetAllTermsRequest$outboundSchema` instead. */
    GetAllTermsRequest$.outboundSchema = GetAllTermsRequest$outboundSchema;
})(GetAllTermsRequest$ || (GetAllTermsRequest$ = {}));
export function getAllTermsRequestToJSON(getAllTermsRequest) {
    return JSON.stringify(GetAllTermsRequest$outboundSchema.parse(getAllTermsRequest));
}
export function getAllTermsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllTermsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllTermsRequest' from JSON`);
}
/** @internal */
export const GetAllTermsResponseBody$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 GetAllTermsResponseBody$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 GetAllTermsResponseBody$;
(function (GetAllTermsResponseBody$) {
    /** @deprecated use `GetAllTermsResponseBody$inboundSchema` instead. */
    GetAllTermsResponseBody$.inboundSchema = GetAllTermsResponseBody$inboundSchema;
    /** @deprecated use `GetAllTermsResponseBody$outboundSchema` instead. */
    GetAllTermsResponseBody$.outboundSchema = GetAllTermsResponseBody$outboundSchema;
})(GetAllTermsResponseBody$ || (GetAllTermsResponseBody$ = {}));
export function getAllTermsResponseBodyToJSON(getAllTermsResponseBody) {
    return JSON.stringify(GetAllTermsResponseBody$outboundSchema.parse(getAllTermsResponseBody));
}
export function getAllTermsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllTermsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllTermsResponseBody' from JSON`);
}
/** @internal */
export const GetAllTermsResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllTermsResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllTermsResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllTermsResponseBody$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 GetAllTermsResponse$;
(function (GetAllTermsResponse$) {
    /** @deprecated use `GetAllTermsResponse$inboundSchema` instead. */
    GetAllTermsResponse$.inboundSchema = GetAllTermsResponse$inboundSchema;
    /** @deprecated use `GetAllTermsResponse$outboundSchema` instead. */
    GetAllTermsResponse$.outboundSchema = GetAllTermsResponse$outboundSchema;
})(GetAllTermsResponse$ || (GetAllTermsResponse$ = {}));
export function getAllTermsResponseToJSON(getAllTermsResponse) {
    return JSON.stringify(GetAllTermsResponse$outboundSchema.parse(getAllTermsResponse));
}
export function getAllTermsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllTermsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllTermsResponse' from JSON`);
}
//# sourceMappingURL=getallterms.js.map