"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.JobIn$outboundSchema = exports.JobInRepositories$outboundSchema = exports.Hyperparameters$outboundSchema = exports.JobInIntegrations$outboundSchema = void 0;
exports.jobInIntegrationsToJSON = jobInIntegrationsToJSON;
exports.hyperparametersToJSON = hyperparametersToJSON;
exports.jobInRepositoriesToJSON = jobInRepositoriesToJSON;
exports.jobInToJSON = jobInToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const classifiertargetin_js_1 = require("./classifiertargetin.js");
const classifiertrainingparametersin_js_1 = require("./classifiertrainingparametersin.js");
const completiontrainingparametersin_js_1 = require("./completiontrainingparametersin.js");
const finetuneablemodeltype_js_1 = require("./finetuneablemodeltype.js");
const githubrepositoryin_js_1 = require("./githubrepositoryin.js");
const trainingfile_js_1 = require("./trainingfile.js");
const wandbintegration_js_1 = require("./wandbintegration.js");
/** @internal */
exports.JobInIntegrations$outboundSchema = wandbintegration_js_1.WandbIntegration$outboundSchema;
function jobInIntegrationsToJSON(jobInIntegrations) {
    return JSON.stringify(exports.JobInIntegrations$outboundSchema.parse(jobInIntegrations));
}
/** @internal */
exports.Hyperparameters$outboundSchema = z.union([
    completiontrainingparametersin_js_1.CompletionTrainingParametersIn$outboundSchema,
    classifiertrainingparametersin_js_1.ClassifierTrainingParametersIn$outboundSchema,
]);
function hyperparametersToJSON(hyperparameters) {
    return JSON.stringify(exports.Hyperparameters$outboundSchema.parse(hyperparameters));
}
/** @internal */
exports.JobInRepositories$outboundSchema = githubrepositoryin_js_1.GithubRepositoryIn$outboundSchema;
function jobInRepositoriesToJSON(jobInRepositories) {
    return JSON.stringify(exports.JobInRepositories$outboundSchema.parse(jobInRepositories));
}
/** @internal */
exports.JobIn$outboundSchema = z.object({
    model: z.string(),
    trainingFiles: z.array(trainingfile_js_1.TrainingFile$outboundSchema).optional(),
    validationFiles: z.nullable(z.array(z.string())).optional(),
    suffix: z.nullable(z.string()).optional(),
    integrations: z.nullable(z.array(wandbintegration_js_1.WandbIntegration$outboundSchema)).optional(),
    autoStart: z.boolean().optional(),
    invalidSampleSkipPercentage: z.number().default(0),
    jobType: z.nullable(finetuneablemodeltype_js_1.FineTuneableModelType$outboundSchema).optional(),
    hyperparameters: z.union([
        completiontrainingparametersin_js_1.CompletionTrainingParametersIn$outboundSchema,
        classifiertrainingparametersin_js_1.ClassifierTrainingParametersIn$outboundSchema,
    ]),
    repositories: z.nullable(z.array(githubrepositoryin_js_1.GithubRepositoryIn$outboundSchema))
        .optional(),
    classifierTargets: z.nullable(z.array(classifiertargetin_js_1.ClassifierTargetIn$outboundSchema))
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        trainingFiles: "training_files",
        validationFiles: "validation_files",
        autoStart: "auto_start",
        invalidSampleSkipPercentage: "invalid_sample_skip_percentage",
        jobType: "job_type",
        classifierTargets: "classifier_targets",
    });
});
function jobInToJSON(jobIn) {
    return JSON.stringify(exports.JobIn$outboundSchema.parse(jobIn));
}
//# sourceMappingURL=jobin.js.map