/*
 * 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 GetAllResultsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllResultsOrderBy$inboundSchema = z.nativeEnum(GetAllResultsOrderBy);
/** @internal */
export const GetAllResultsOrderBy$outboundSchema = GetAllResultsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllResultsOrderBy$;
(function (GetAllResultsOrderBy$) {
    /** @deprecated use `GetAllResultsOrderBy$inboundSchema` instead. */
    GetAllResultsOrderBy$.inboundSchema = GetAllResultsOrderBy$inboundSchema;
    /** @deprecated use `GetAllResultsOrderBy$outboundSchema` instead. */
    GetAllResultsOrderBy$.outboundSchema = GetAllResultsOrderBy$outboundSchema;
})(GetAllResultsOrderBy$ || (GetAllResultsOrderBy$ = {}));
/** @internal */
export const GetAllResultsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllResultsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllResultsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllResultsOrderBy$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 GetAllResultsRequest$;
(function (GetAllResultsRequest$) {
    /** @deprecated use `GetAllResultsRequest$inboundSchema` instead. */
    GetAllResultsRequest$.inboundSchema = GetAllResultsRequest$inboundSchema;
    /** @deprecated use `GetAllResultsRequest$outboundSchema` instead. */
    GetAllResultsRequest$.outboundSchema = GetAllResultsRequest$outboundSchema;
})(GetAllResultsRequest$ || (GetAllResultsRequest$ = {}));
export function getAllResultsRequestToJSON(getAllResultsRequest) {
    return JSON.stringify(GetAllResultsRequest$outboundSchema.parse(getAllResultsRequest));
}
export function getAllResultsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllResultsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResultsRequest' from JSON`);
}
/** @internal */
export const GetAllResultsResponseBody$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 GetAllResultsResponseBody$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 GetAllResultsResponseBody$;
(function (GetAllResultsResponseBody$) {
    /** @deprecated use `GetAllResultsResponseBody$inboundSchema` instead. */
    GetAllResultsResponseBody$.inboundSchema = GetAllResultsResponseBody$inboundSchema;
    /** @deprecated use `GetAllResultsResponseBody$outboundSchema` instead. */
    GetAllResultsResponseBody$.outboundSchema = GetAllResultsResponseBody$outboundSchema;
})(GetAllResultsResponseBody$ || (GetAllResultsResponseBody$ = {}));
export function getAllResultsResponseBodyToJSON(getAllResultsResponseBody) {
    return JSON.stringify(GetAllResultsResponseBody$outboundSchema.parse(getAllResultsResponseBody));
}
export function getAllResultsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllResultsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResultsResponseBody' from JSON`);
}
/** @internal */
export const GetAllResultsResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllResultsResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllResultsResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllResultsResponseBody$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 GetAllResultsResponse$;
(function (GetAllResultsResponse$) {
    /** @deprecated use `GetAllResultsResponse$inboundSchema` instead. */
    GetAllResultsResponse$.inboundSchema = GetAllResultsResponse$inboundSchema;
    /** @deprecated use `GetAllResultsResponse$outboundSchema` instead. */
    GetAllResultsResponse$.outboundSchema = GetAllResultsResponse$outboundSchema;
})(GetAllResultsResponse$ || (GetAllResultsResponse$ = {}));
export function getAllResultsResponseToJSON(getAllResultsResponse) {
    return JSON.stringify(GetAllResultsResponse$outboundSchema.parse(getAllResultsResponse));
}
export function getAllResultsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllResultsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResultsResponse' from JSON`);
}
//# sourceMappingURL=getallresults.js.map