"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.ListModelsResponseBody$outboundSchema = exports.ListModelsResponseBody$inboundSchema = exports.ListModelsData$outboundSchema = exports.ListModelsData$inboundSchema = exports.OwnedBy$outboundSchema = exports.OwnedBy$inboundSchema = exports.ListModelsType$outboundSchema = exports.ListModelsType$inboundSchema = exports.ListModelsObject$outboundSchema = exports.ListModelsObject$inboundSchema = exports.OwnedBy = exports.ListModelsType = exports.ListModelsObject = void 0;
exports.listModelsDataToJSON = listModelsDataToJSON;
exports.listModelsDataFromJSON = listModelsDataFromJSON;
exports.listModelsResponseBodyToJSON = listModelsResponseBodyToJSON;
exports.listModelsResponseBodyFromJSON = listModelsResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.ListModelsObject = {
    List: "list",
};
/**
 * The modality of the model
 */
exports.ListModelsType = {
    Chat: "chat",
    Completion: "completion",
    Embedding: "embedding",
    Image: "image",
    Tts: "tts",
    Stt: "stt",
    Rerank: "rerank",
    Moderation: "moderation",
    Vision: "vision",
};
/**
 * Describe the provider of the model. Every model with `vendor` is publicly available, while models with `workspace` are private.
 */
exports.OwnedBy = {
    Vendor: "vendor",
    Workspace: "workspace",
};
/** @internal */
exports.ListModelsObject$inboundSchema = z.nativeEnum(exports.ListModelsObject);
/** @internal */
exports.ListModelsObject$outboundSchema = exports.ListModelsObject$inboundSchema;
/** @internal */
exports.ListModelsType$inboundSchema = z.nativeEnum(exports.ListModelsType);
/** @internal */
exports.ListModelsType$outboundSchema = exports.ListModelsType$inboundSchema;
/** @internal */
exports.OwnedBy$inboundSchema = z
    .nativeEnum(exports.OwnedBy);
/** @internal */
exports.OwnedBy$outboundSchema = exports.OwnedBy$inboundSchema;
/** @internal */
exports.ListModelsData$inboundSchema = z.object({
    id: z.string(),
    created: z.number(),
    type: exports.ListModelsType$inboundSchema,
    owned_by: exports.OwnedBy$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "owned_by": "ownedBy",
    });
});
/** @internal */
exports.ListModelsData$outboundSchema = z.object({
    id: z.string(),
    created: z.number(),
    type: exports.ListModelsType$outboundSchema,
    ownedBy: exports.OwnedBy$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        ownedBy: "owned_by",
    });
});
function listModelsDataToJSON(listModelsData) {
    return JSON.stringify(exports.ListModelsData$outboundSchema.parse(listModelsData));
}
function listModelsDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListModelsData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListModelsData' from JSON`);
}
/** @internal */
exports.ListModelsResponseBody$inboundSchema = z.object({
    object: exports.ListModelsObject$inboundSchema,
    data: z.array(z.lazy(() => exports.ListModelsData$inboundSchema)),
    has_more: z.boolean(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "has_more": "hasMore",
    });
});
/** @internal */
exports.ListModelsResponseBody$outboundSchema = z.object({
    object: exports.ListModelsObject$outboundSchema,
    data: z.array(z.lazy(() => exports.ListModelsData$outboundSchema)),
    hasMore: z.boolean(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        hasMore: "has_more",
    });
});
function listModelsResponseBodyToJSON(listModelsResponseBody) {
    return JSON.stringify(exports.ListModelsResponseBody$outboundSchema.parse(listModelsResponseBody));
}
function listModelsResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListModelsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListModelsResponseBody' from JSON`);
}
//# sourceMappingURL=listmodels.js.map