"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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CompletionDetailedJobOut$ = exports.CompletionDetailedJobOut$outboundSchema = exports.CompletionDetailedJobOut$inboundSchema = exports.CompletionDetailedJobOutRepositories$ = exports.CompletionDetailedJobOutRepositories$outboundSchema = exports.CompletionDetailedJobOutRepositories$inboundSchema = exports.CompletionDetailedJobOutJobType$ = exports.CompletionDetailedJobOutJobType$outboundSchema = exports.CompletionDetailedJobOutJobType$inboundSchema = exports.CompletionDetailedJobOutIntegrations$ = exports.CompletionDetailedJobOutIntegrations$outboundSchema = exports.CompletionDetailedJobOutIntegrations$inboundSchema = exports.CompletionDetailedJobOutObject$ = exports.CompletionDetailedJobOutObject$outboundSchema = exports.CompletionDetailedJobOutObject$inboundSchema = exports.CompletionDetailedJobOutStatus$ = exports.CompletionDetailedJobOutStatus$outboundSchema = exports.CompletionDetailedJobOutStatus$inboundSchema = exports.CompletionDetailedJobOutJobType = exports.CompletionDetailedJobOutObject = exports.CompletionDetailedJobOutStatus = void 0;
exports.completionDetailedJobOutIntegrationsToJSON = completionDetailedJobOutIntegrationsToJSON;
exports.completionDetailedJobOutIntegrationsFromJSON = completionDetailedJobOutIntegrationsFromJSON;
exports.completionDetailedJobOutRepositoriesToJSON = completionDetailedJobOutRepositoriesToJSON;
exports.completionDetailedJobOutRepositoriesFromJSON = completionDetailedJobOutRepositoriesFromJSON;
exports.completionDetailedJobOutToJSON = completionDetailedJobOutToJSON;
exports.completionDetailedJobOutFromJSON = completionDetailedJobOutFromJSON;
const z = __importStar(require("zod"));
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",
};
exports.CompletionDetailedJobOutObject = {
    Job: "job",
};
exports.CompletionDetailedJobOutJobType = {
    Completion: "completion",
};
/** @internal */
exports.CompletionDetailedJobOutStatus$inboundSchema = z.nativeEnum(exports.CompletionDetailedJobOutStatus);
/** @internal */
exports.CompletionDetailedJobOutStatus$outboundSchema = exports.CompletionDetailedJobOutStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CompletionDetailedJobOutStatus$;
(function (CompletionDetailedJobOutStatus$) {
    /** @deprecated use `CompletionDetailedJobOutStatus$inboundSchema` instead. */
    CompletionDetailedJobOutStatus$.inboundSchema = exports.CompletionDetailedJobOutStatus$inboundSchema;
    /** @deprecated use `CompletionDetailedJobOutStatus$outboundSchema` instead. */
    CompletionDetailedJobOutStatus$.outboundSchema = exports.CompletionDetailedJobOutStatus$outboundSchema;
})(CompletionDetailedJobOutStatus$ || (exports.CompletionDetailedJobOutStatus$ = CompletionDetailedJobOutStatus$ = {}));
/** @internal */
exports.CompletionDetailedJobOutObject$inboundSchema = z.nativeEnum(exports.CompletionDetailedJobOutObject);
/** @internal */
exports.CompletionDetailedJobOutObject$outboundSchema = exports.CompletionDetailedJobOutObject$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CompletionDetailedJobOutObject$;
(function (CompletionDetailedJobOutObject$) {
    /** @deprecated use `CompletionDetailedJobOutObject$inboundSchema` instead. */
    CompletionDetailedJobOutObject$.inboundSchema = exports.CompletionDetailedJobOutObject$inboundSchema;
    /** @deprecated use `CompletionDetailedJobOutObject$outboundSchema` instead. */
    CompletionDetailedJobOutObject$.outboundSchema = exports.CompletionDetailedJobOutObject$outboundSchema;
})(CompletionDetailedJobOutObject$ || (exports.CompletionDetailedJobOutObject$ = CompletionDetailedJobOutObject$ = {}));
/** @internal */
exports.CompletionDetailedJobOutIntegrations$inboundSchema = wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema;
/** @internal */
exports.CompletionDetailedJobOutIntegrations$outboundSchema = wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CompletionDetailedJobOutIntegrations$;
(function (CompletionDetailedJobOutIntegrations$) {
    /** @deprecated use `CompletionDetailedJobOutIntegrations$inboundSchema` instead. */
    CompletionDetailedJobOutIntegrations$.inboundSchema = exports.CompletionDetailedJobOutIntegrations$inboundSchema;
    /** @deprecated use `CompletionDetailedJobOutIntegrations$outboundSchema` instead. */
    CompletionDetailedJobOutIntegrations$.outboundSchema = exports.CompletionDetailedJobOutIntegrations$outboundSchema;
})(CompletionDetailedJobOutIntegrations$ || (exports.CompletionDetailedJobOutIntegrations$ = CompletionDetailedJobOutIntegrations$ = {}));
function completionDetailedJobOutIntegrationsToJSON(completionDetailedJobOutIntegrations) {
    return JSON.stringify(exports.CompletionDetailedJobOutIntegrations$outboundSchema.parse(completionDetailedJobOutIntegrations));
}
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.CompletionDetailedJobOutJobType$inboundSchema = z.nativeEnum(exports.CompletionDetailedJobOutJobType);
/** @internal */
exports.CompletionDetailedJobOutJobType$outboundSchema = exports.CompletionDetailedJobOutJobType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CompletionDetailedJobOutJobType$;
(function (CompletionDetailedJobOutJobType$) {
    /** @deprecated use `CompletionDetailedJobOutJobType$inboundSchema` instead. */
    CompletionDetailedJobOutJobType$.inboundSchema = exports.CompletionDetailedJobOutJobType$inboundSchema;
    /** @deprecated use `CompletionDetailedJobOutJobType$outboundSchema` instead. */
    CompletionDetailedJobOutJobType$.outboundSchema = exports.CompletionDetailedJobOutJobType$outboundSchema;
})(CompletionDetailedJobOutJobType$ || (exports.CompletionDetailedJobOutJobType$ = CompletionDetailedJobOutJobType$ = {}));
/** @internal */
exports.CompletionDetailedJobOutRepositories$inboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema;
/** @internal */
exports.CompletionDetailedJobOutRepositories$outboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CompletionDetailedJobOutRepositories$;
(function (CompletionDetailedJobOutRepositories$) {
    /** @deprecated use `CompletionDetailedJobOutRepositories$inboundSchema` instead. */
    CompletionDetailedJobOutRepositories$.inboundSchema = exports.CompletionDetailedJobOutRepositories$inboundSchema;
    /** @deprecated use `CompletionDetailedJobOutRepositories$outboundSchema` instead. */
    CompletionDetailedJobOutRepositories$.outboundSchema = exports.CompletionDetailedJobOutRepositories$outboundSchema;
})(CompletionDetailedJobOutRepositories$ || (exports.CompletionDetailedJobOutRepositories$ = CompletionDetailedJobOutRepositories$ = {}));
function completionDetailedJobOutRepositoriesToJSON(completionDetailedJobOutRepositories) {
    return JSON.stringify(exports.CompletionDetailedJobOutRepositories$outboundSchema.parse(completionDetailedJobOutRepositories));
}
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: exports.CompletionDetailedJobOutObject$inboundSchema.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: exports.CompletionDetailedJobOutJobType$inboundSchema.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",
    });
});
/** @internal */
exports.CompletionDetailedJobOut$outboundSchema = z.object({
    id: z.string(),
    autoStart: z.boolean(),
    model: z.string(),
    status: exports.CompletionDetailedJobOutStatus$outboundSchema,
    createdAt: z.number().int(),
    modifiedAt: z.number().int(),
    trainingFiles: z.array(z.string()),
    validationFiles: z.nullable(z.array(z.string())).optional(),
    object: exports.CompletionDetailedJobOutObject$outboundSchema.default("job"),
    fineTunedModel: z.nullable(z.string()).optional(),
    suffix: z.nullable(z.string()).optional(),
    integrations: z.nullable(z.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema))
        .optional(),
    trainedTokens: z.nullable(z.number().int()).optional(),
    metadata: z.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional(),
    jobType: exports.CompletionDetailedJobOutJobType$outboundSchema.default("completion"),
    hyperparameters: completiontrainingparameters_js_1.CompletionTrainingParameters$outboundSchema,
    repositories: z.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(),
    events: z.array(eventout_js_1.EventOut$outboundSchema).optional(),
    checkpoints: z.array(checkpointout_js_1.CheckpointOut$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        autoStart: "auto_start",
        createdAt: "created_at",
        modifiedAt: "modified_at",
        trainingFiles: "training_files",
        validationFiles: "validation_files",
        fineTunedModel: "fine_tuned_model",
        trainedTokens: "trained_tokens",
        jobType: "job_type",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CompletionDetailedJobOut$;
(function (CompletionDetailedJobOut$) {
    /** @deprecated use `CompletionDetailedJobOut$inboundSchema` instead. */
    CompletionDetailedJobOut$.inboundSchema = exports.CompletionDetailedJobOut$inboundSchema;
    /** @deprecated use `CompletionDetailedJobOut$outboundSchema` instead. */
    CompletionDetailedJobOut$.outboundSchema = exports.CompletionDetailedJobOut$outboundSchema;
})(CompletionDetailedJobOut$ || (exports.CompletionDetailedJobOut$ = CompletionDetailedJobOut$ = {}));
function completionDetailedJobOutToJSON(completionDetailedJobOut) {
    return JSON.stringify(exports.CompletionDetailedJobOut$outboundSchema.parse(completionDetailedJobOut));
}
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=https://main.vscode-cdn.net/sourcemaps/5441a53ac43cd6fc36e1ed855a6aa97abb5fd488/node_modules/@mistralai/mistralai/models/components/completiondetailedjobout.js.map