"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetAllResultsResponse$ = exports.GetAllResultsResponse$outboundSchema = exports.GetAllResultsResponse$inboundSchema = exports.GetAllResultsResponseBody$ = exports.GetAllResultsResponseBody$outboundSchema = exports.GetAllResultsResponseBody$inboundSchema = exports.GetAllResultsRequest$ = exports.GetAllResultsRequest$outboundSchema = exports.GetAllResultsRequest$inboundSchema = exports.GetAllResultsOrderBy$ = exports.GetAllResultsOrderBy$outboundSchema = exports.GetAllResultsOrderBy$inboundSchema = exports.GetAllResultsOrderBy = void 0;
exports.getAllResultsRequestToJSON = getAllResultsRequestToJSON;
exports.getAllResultsRequestFromJSON = getAllResultsRequestFromJSON;
exports.getAllResultsResponseBodyToJSON = getAllResultsResponseBodyToJSON;
exports.getAllResultsResponseBodyFromJSON = getAllResultsResponseBodyFromJSON;
exports.getAllResultsResponseToJSON = getAllResultsResponseToJSON;
exports.getAllResultsResponseFromJSON = getAllResultsResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * The order to sort the response by
 */
exports.GetAllResultsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
exports.GetAllResultsOrderBy$inboundSchema = z.nativeEnum(exports.GetAllResultsOrderBy);
/** @internal */
exports.GetAllResultsOrderBy$outboundSchema = exports.GetAllResultsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllResultsOrderBy$;
(function (GetAllResultsOrderBy$) {
    /** @deprecated use `GetAllResultsOrderBy$inboundSchema` instead. */
    GetAllResultsOrderBy$.inboundSchema = exports.GetAllResultsOrderBy$inboundSchema;
    /** @deprecated use `GetAllResultsOrderBy$outboundSchema` instead. */
    GetAllResultsOrderBy$.outboundSchema = exports.GetAllResultsOrderBy$outboundSchema;
})(GetAllResultsOrderBy$ || (exports.GetAllResultsOrderBy$ = GetAllResultsOrderBy$ = {}));
/** @internal */
exports.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: exports.GetAllResultsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.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: exports.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.
 */
var GetAllResultsRequest$;
(function (GetAllResultsRequest$) {
    /** @deprecated use `GetAllResultsRequest$inboundSchema` instead. */
    GetAllResultsRequest$.inboundSchema = exports.GetAllResultsRequest$inboundSchema;
    /** @deprecated use `GetAllResultsRequest$outboundSchema` instead. */
    GetAllResultsRequest$.outboundSchema = exports.GetAllResultsRequest$outboundSchema;
})(GetAllResultsRequest$ || (exports.GetAllResultsRequest$ = GetAllResultsRequest$ = {}));
function getAllResultsRequestToJSON(getAllResultsRequest) {
    return JSON.stringify(exports.GetAllResultsRequest$outboundSchema.parse(getAllResultsRequest));
}
function getAllResultsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllResultsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResultsRequest' from JSON`);
}
/** @internal */
exports.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 */
exports.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.
 */
var GetAllResultsResponseBody$;
(function (GetAllResultsResponseBody$) {
    /** @deprecated use `GetAllResultsResponseBody$inboundSchema` instead. */
    GetAllResultsResponseBody$.inboundSchema = exports.GetAllResultsResponseBody$inboundSchema;
    /** @deprecated use `GetAllResultsResponseBody$outboundSchema` instead. */
    GetAllResultsResponseBody$.outboundSchema = exports.GetAllResultsResponseBody$outboundSchema;
})(GetAllResultsResponseBody$ || (exports.GetAllResultsResponseBody$ = GetAllResultsResponseBody$ = {}));
function getAllResultsResponseBodyToJSON(getAllResultsResponseBody) {
    return JSON.stringify(exports.GetAllResultsResponseBody$outboundSchema.parse(getAllResultsResponseBody));
}
function getAllResultsResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllResultsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResultsResponseBody' from JSON`);
}
/** @internal */
exports.GetAllResultsResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetAllResultsResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetAllResultsResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetAllResultsResponseBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var GetAllResultsResponse$;
(function (GetAllResultsResponse$) {
    /** @deprecated use `GetAllResultsResponse$inboundSchema` instead. */
    GetAllResultsResponse$.inboundSchema = exports.GetAllResultsResponse$inboundSchema;
    /** @deprecated use `GetAllResultsResponse$outboundSchema` instead. */
    GetAllResultsResponse$.outboundSchema = exports.GetAllResultsResponse$outboundSchema;
})(GetAllResultsResponse$ || (exports.GetAllResultsResponse$ = GetAllResultsResponse$ = {}));
function getAllResultsResponseToJSON(getAllResultsResponse) {
    return JSON.stringify(exports.GetAllResultsResponse$outboundSchema.parse(getAllResultsResponse));
}
function getAllResultsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllResultsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResultsResponse' from JSON`);
}
//# sourceMappingURL=getallresults.js.map