"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.ModelCreateResponseBody$inboundSchema = exports.ModelCreateRequestBody$outboundSchema = void 0;
exports.modelCreateRequestBodyToJSON = modelCreateRequestBodyToJSON;
exports.modelCreateResponseBodyFromJSON = modelCreateResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/** @internal */
exports.ModelCreateRequestBody$outboundSchema = z.object({
    configuration: z.record(z.any()),
    displayName: z.string(),
    hasFunctions: z.boolean(),
    id: z.string(),
    inputCost: z.number(),
    metadata: components.ModelMetadata$outboundSchema,
    modelDeveloper: z.string(),
    modelFamily: z.string(),
    modelId: z.string(),
    modelType: z.string(),
    outputCost: z.number(),
    parameters: z.nullable(z.array(components.CreateModelParameter$outboundSchema)),
    provider: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        hasFunctions: "has_functions",
        inputCost: "input_cost",
        modelDeveloper: "model_developer",
        modelFamily: "model_family",
        modelId: "model_id",
        modelType: "model_type",
        outputCost: "output_cost",
    });
});
function modelCreateRequestBodyToJSON(modelCreateRequestBody) {
    return JSON.stringify(exports.ModelCreateRequestBody$outboundSchema.parse(modelCreateRequestBody));
}
/** @internal */
exports.ModelCreateResponseBody$inboundSchema = z.object({
    configuration: components.ModelConfigurationResponse$inboundSchema,
    created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    description: z.nullable(z.string()),
    display_name: z.string(),
    docs_url: z.nullable(z.string()),
    enabled: z.boolean(),
    enabled_for_endpoints: z.boolean(),
    enabled_for_playground: z.boolean(),
    has_cpu_pricing: z.boolean(),
    has_functions: z.boolean(),
    id: z.string(),
    input_cost: z.nullable(z.number()),
    input_currency: z.string(),
    is_active: z.boolean(),
    metadata: components.ModelMetadata$inboundSchema,
    model_developer: z.string().optional(),
    model_family: z.string().optional(),
    model_id: z.string(),
    model_type: z.string(),
    output_cost: z.nullable(z.number()),
    output_currency: z.string(),
    owner: z.string(),
    parameters: z.nullable(z.array(components.ModelParameterDocument$inboundSchema)),
    pricing_url: z.nullable(z.string()),
    provider: z.string(),
    refId: z.string(),
    updated: z.string().datetime({ offset: true }).transform(v => new Date(v)),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
        "docs_url": "docsUrl",
        "enabled_for_endpoints": "enabledForEndpoints",
        "enabled_for_playground": "enabledForPlayground",
        "has_cpu_pricing": "hasCpuPricing",
        "has_functions": "hasFunctions",
        "input_cost": "inputCost",
        "input_currency": "inputCurrency",
        "is_active": "isActive",
        "model_developer": "modelDeveloper",
        "model_family": "modelFamily",
        "model_id": "modelId",
        "model_type": "modelType",
        "output_cost": "outputCost",
        "output_currency": "outputCurrency",
        "pricing_url": "pricingUrl",
    });
});
function modelCreateResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ModelCreateResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ModelCreateResponseBody' from JSON`);
}
//# sourceMappingURL=modelcreate.js.map