/*
 * 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 GetResultsForLineItemForClassOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetResultsForLineItemForClassOrderBy$inboundSchema = z.nativeEnum(GetResultsForLineItemForClassOrderBy);
/** @internal */
export const GetResultsForLineItemForClassOrderBy$outboundSchema = GetResultsForLineItemForClassOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetResultsForLineItemForClassOrderBy$;
(function (GetResultsForLineItemForClassOrderBy$) {
    /** @deprecated use `GetResultsForLineItemForClassOrderBy$inboundSchema` instead. */
    GetResultsForLineItemForClassOrderBy$.inboundSchema = GetResultsForLineItemForClassOrderBy$inboundSchema;
    /** @deprecated use `GetResultsForLineItemForClassOrderBy$outboundSchema` instead. */
    GetResultsForLineItemForClassOrderBy$.outboundSchema = GetResultsForLineItemForClassOrderBy$outboundSchema;
})(GetResultsForLineItemForClassOrderBy$ || (GetResultsForLineItemForClassOrderBy$ = {}));
/** @internal */
export const GetResultsForLineItemForClassRequest$inboundSchema = z.object({
    classSourcedId: z.string(),
    lineItemSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetResultsForLineItemForClassOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetResultsForLineItemForClassRequest$outboundSchema = z.object({
    classSourcedId: z.string(),
    lineItemSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetResultsForLineItemForClassOrderBy$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 GetResultsForLineItemForClassRequest$;
(function (GetResultsForLineItemForClassRequest$) {
    /** @deprecated use `GetResultsForLineItemForClassRequest$inboundSchema` instead. */
    GetResultsForLineItemForClassRequest$.inboundSchema = GetResultsForLineItemForClassRequest$inboundSchema;
    /** @deprecated use `GetResultsForLineItemForClassRequest$outboundSchema` instead. */
    GetResultsForLineItemForClassRequest$.outboundSchema = GetResultsForLineItemForClassRequest$outboundSchema;
})(GetResultsForLineItemForClassRequest$ || (GetResultsForLineItemForClassRequest$ = {}));
export function getResultsForLineItemForClassRequestToJSON(getResultsForLineItemForClassRequest) {
    return JSON.stringify(GetResultsForLineItemForClassRequest$outboundSchema.parse(getResultsForLineItemForClassRequest));
}
export function getResultsForLineItemForClassRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetResultsForLineItemForClassRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResultsForLineItemForClassRequest' from JSON`);
}
/** @internal */
export const GetResultsForLineItemForClassResponseBody$inboundSchema = z.object({
    results: z.array(components.Result$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetResultsForLineItemForClassResponseBody$outboundSchema = z.object({
    results: z.array(components.Result$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 GetResultsForLineItemForClassResponseBody$;
(function (GetResultsForLineItemForClassResponseBody$) {
    /** @deprecated use `GetResultsForLineItemForClassResponseBody$inboundSchema` instead. */
    GetResultsForLineItemForClassResponseBody$.inboundSchema = GetResultsForLineItemForClassResponseBody$inboundSchema;
    /** @deprecated use `GetResultsForLineItemForClassResponseBody$outboundSchema` instead. */
    GetResultsForLineItemForClassResponseBody$.outboundSchema = GetResultsForLineItemForClassResponseBody$outboundSchema;
})(GetResultsForLineItemForClassResponseBody$ || (GetResultsForLineItemForClassResponseBody$ = {}));
export function getResultsForLineItemForClassResponseBodyToJSON(getResultsForLineItemForClassResponseBody) {
    return JSON.stringify(GetResultsForLineItemForClassResponseBody$outboundSchema.parse(getResultsForLineItemForClassResponseBody));
}
export function getResultsForLineItemForClassResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetResultsForLineItemForClassResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResultsForLineItemForClassResponseBody' from JSON`);
}
/** @internal */
export const GetResultsForLineItemForClassResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetResultsForLineItemForClassResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetResultsForLineItemForClassResponse$outboundSchema = z.object({
    result: z.lazy(() => GetResultsForLineItemForClassResponseBody$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 GetResultsForLineItemForClassResponse$;
(function (GetResultsForLineItemForClassResponse$) {
    /** @deprecated use `GetResultsForLineItemForClassResponse$inboundSchema` instead. */
    GetResultsForLineItemForClassResponse$.inboundSchema = GetResultsForLineItemForClassResponse$inboundSchema;
    /** @deprecated use `GetResultsForLineItemForClassResponse$outboundSchema` instead. */
    GetResultsForLineItemForClassResponse$.outboundSchema = GetResultsForLineItemForClassResponse$outboundSchema;
})(GetResultsForLineItemForClassResponse$ || (GetResultsForLineItemForClassResponse$ = {}));
export function getResultsForLineItemForClassResponseToJSON(getResultsForLineItemForClassResponse) {
    return JSON.stringify(GetResultsForLineItemForClassResponse$outboundSchema.parse(getResultsForLineItemForClassResponse));
}
export function getResultsForLineItemForClassResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetResultsForLineItemForClassResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResultsForLineItemForClassResponse' from JSON`);
}
//# sourceMappingURL=getresultsforlineitemforclass.js.map