"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.CompletionDetailedJobOut$inboundSchema = exports.CompletionDetailedJobOutRepositories$inboundSchema = exports.CompletionDetailedJobOutIntegrations$inboundSchema = exports.CompletionDetailedJobOutStatus$inboundSchema = exports.CompletionDetailedJobOutStatus = void 0;
exports.completionDetailedJobOutIntegrationsFromJSON = completionDetailedJobOutIntegrationsFromJSON;
exports.completionDetailedJobOutRepositoriesFromJSON = completionDetailedJobOutRepositoriesFromJSON;
exports.completionDetailedJobOutFromJSON = completionDetailedJobOutFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const checkpointout_js_1 = require("./checkpointout.js");
const completiontrainingparameters_js_1 = require("./completiontrainingparameters.js");
const eventout_js_1 = require("./eventout.js");
const githubrepositoryout_js_1 = require("./githubrepositoryout.js");
const jobmetadataout_js_1 = require("./jobmetadataout.js");
const wandbintegrationout_js_1 = require("./wandbintegrationout.js");
exports.CompletionDetailedJobOutStatus = {
    Queued: "QUEUED",
    Started: "STARTED",
    Validating: "VALIDATING",
    Validated: "VALIDATED",
    Running: "RUNNING",
    FailedValidation: "FAILED_VALIDATION",
    Failed: "FAILED",
    Success: "SUCCESS",
    Cancelled: "CANCELLED",
    CancellationRequested: "CANCELLATION_REQUESTED",
};
/** @internal */
exports.CompletionDetailedJobOutStatus$inboundSchema = z.nativeEnum(exports.CompletionDetailedJobOutStatus);
/** @internal */
exports.CompletionDetailedJobOutIntegrations$inboundSchema = wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema;
function completionDetailedJobOutIntegrationsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CompletionDetailedJobOutIntegrations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionDetailedJobOutIntegrations' from JSON`);
}
/** @internal */
exports.CompletionDetailedJobOutRepositories$inboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema;
function completionDetailedJobOutRepositoriesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CompletionDetailedJobOutRepositories$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionDetailedJobOutRepositories' from JSON`);
}
/** @internal */
exports.CompletionDetailedJobOut$inboundSchema = z.object({
    id: z.string(),
    auto_start: z.boolean(),
    model: z.string(),
    status: exports.CompletionDetailedJobOutStatus$inboundSchema,
    created_at: z.number().int(),
    modified_at: z.number().int(),
    training_files: z.array(z.string()),
    validation_files: z.nullable(z.array(z.string())).optional(),
    object: z.literal("job").default("job"),
    fine_tuned_model: z.nullable(z.string()).optional(),
    suffix: z.nullable(z.string()).optional(),
    integrations: z.nullable(z.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema))
        .optional(),
    trained_tokens: z.nullable(z.number().int()).optional(),
    metadata: z.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional(),
    job_type: z.literal("completion").default("completion"),
    hyperparameters: completiontrainingparameters_js_1.CompletionTrainingParameters$inboundSchema,
    repositories: z.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(),
    events: z.array(eventout_js_1.EventOut$inboundSchema).optional(),
    checkpoints: z.array(checkpointout_js_1.CheckpointOut$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "auto_start": "autoStart",
        "created_at": "createdAt",
        "modified_at": "modifiedAt",
        "training_files": "trainingFiles",
        "validation_files": "validationFiles",
        "fine_tuned_model": "fineTunedModel",
        "trained_tokens": "trainedTokens",
        "job_type": "jobType",
    });
});
function completionDetailedJobOutFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CompletionDetailedJobOut$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionDetailedJobOut' from JSON`);
}
//# sourceMappingURL=completiondetailedjobout.js.map