/*
 * 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 GetAllEnrollmentsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllEnrollmentsOrderBy$inboundSchema = z.nativeEnum(GetAllEnrollmentsOrderBy);
/** @internal */
export const GetAllEnrollmentsOrderBy$outboundSchema = GetAllEnrollmentsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllEnrollmentsOrderBy$;
(function (GetAllEnrollmentsOrderBy$) {
    /** @deprecated use `GetAllEnrollmentsOrderBy$inboundSchema` instead. */
    GetAllEnrollmentsOrderBy$.inboundSchema = GetAllEnrollmentsOrderBy$inboundSchema;
    /** @deprecated use `GetAllEnrollmentsOrderBy$outboundSchema` instead. */
    GetAllEnrollmentsOrderBy$.outboundSchema = GetAllEnrollmentsOrderBy$outboundSchema;
})(GetAllEnrollmentsOrderBy$ || (GetAllEnrollmentsOrderBy$ = {}));
/** @internal */
export const GetAllEnrollmentsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllEnrollmentsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllEnrollmentsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllEnrollmentsOrderBy$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 GetAllEnrollmentsRequest$;
(function (GetAllEnrollmentsRequest$) {
    /** @deprecated use `GetAllEnrollmentsRequest$inboundSchema` instead. */
    GetAllEnrollmentsRequest$.inboundSchema = GetAllEnrollmentsRequest$inboundSchema;
    /** @deprecated use `GetAllEnrollmentsRequest$outboundSchema` instead. */
    GetAllEnrollmentsRequest$.outboundSchema = GetAllEnrollmentsRequest$outboundSchema;
})(GetAllEnrollmentsRequest$ || (GetAllEnrollmentsRequest$ = {}));
export function getAllEnrollmentsRequestToJSON(getAllEnrollmentsRequest) {
    return JSON.stringify(GetAllEnrollmentsRequest$outboundSchema.parse(getAllEnrollmentsRequest));
}
export function getAllEnrollmentsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllEnrollmentsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllEnrollmentsRequest' from JSON`);
}
/** @internal */
export const GetAllEnrollmentsResponseBody$inboundSchema = z.object({
    enrollments: z.array(components.Enrollment$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetAllEnrollmentsResponseBody$outboundSchema = z.object({
    enrollments: z.array(components.Enrollment$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 GetAllEnrollmentsResponseBody$;
(function (GetAllEnrollmentsResponseBody$) {
    /** @deprecated use `GetAllEnrollmentsResponseBody$inboundSchema` instead. */
    GetAllEnrollmentsResponseBody$.inboundSchema = GetAllEnrollmentsResponseBody$inboundSchema;
    /** @deprecated use `GetAllEnrollmentsResponseBody$outboundSchema` instead. */
    GetAllEnrollmentsResponseBody$.outboundSchema = GetAllEnrollmentsResponseBody$outboundSchema;
})(GetAllEnrollmentsResponseBody$ || (GetAllEnrollmentsResponseBody$ = {}));
export function getAllEnrollmentsResponseBodyToJSON(getAllEnrollmentsResponseBody) {
    return JSON.stringify(GetAllEnrollmentsResponseBody$outboundSchema.parse(getAllEnrollmentsResponseBody));
}
export function getAllEnrollmentsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllEnrollmentsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllEnrollmentsResponseBody' from JSON`);
}
/** @internal */
export const GetAllEnrollmentsResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllEnrollmentsResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllEnrollmentsResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllEnrollmentsResponseBody$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 GetAllEnrollmentsResponse$;
(function (GetAllEnrollmentsResponse$) {
    /** @deprecated use `GetAllEnrollmentsResponse$inboundSchema` instead. */
    GetAllEnrollmentsResponse$.inboundSchema = GetAllEnrollmentsResponse$inboundSchema;
    /** @deprecated use `GetAllEnrollmentsResponse$outboundSchema` instead. */
    GetAllEnrollmentsResponse$.outboundSchema = GetAllEnrollmentsResponse$outboundSchema;
})(GetAllEnrollmentsResponse$ || (GetAllEnrollmentsResponse$ = {}));
export function getAllEnrollmentsResponseToJSON(getAllEnrollmentsResponse) {
    return JSON.stringify(GetAllEnrollmentsResponse$outboundSchema.parse(getAllEnrollmentsResponse));
}
export function getAllEnrollmentsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllEnrollmentsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllEnrollmentsResponse' from JSON`);
}
//# sourceMappingURL=getallenrollments.js.map