"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.ClassifierJobOut$ = exports.ClassifierJobOut$outboundSchema = exports.ClassifierJobOut$inboundSchema = exports.ClassifierJobOutJobType$ = exports.ClassifierJobOutJobType$outboundSchema = exports.ClassifierJobOutJobType$inboundSchema = exports.ClassifierJobOutIntegrations$ = exports.ClassifierJobOutIntegrations$outboundSchema = exports.ClassifierJobOutIntegrations$inboundSchema = exports.ClassifierJobOutObject$ = exports.ClassifierJobOutObject$outboundSchema = exports.ClassifierJobOutObject$inboundSchema = exports.ClassifierJobOutStatus$ = exports.ClassifierJobOutStatus$outboundSchema = exports.ClassifierJobOutStatus$inboundSchema = exports.ClassifierJobOutJobType = exports.ClassifierJobOutObject = exports.ClassifierJobOutStatus = void 0;
exports.classifierJobOutIntegrationsToJSON = classifierJobOutIntegrationsToJSON;
exports.classifierJobOutIntegrationsFromJSON = classifierJobOutIntegrationsFromJSON;
exports.classifierJobOutToJSON = classifierJobOutToJSON;
exports.classifierJobOutFromJSON = classifierJobOutFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const classifiertrainingparameters_js_1 = require("./classifiertrainingparameters.js");
const jobmetadataout_js_1 = require("./jobmetadataout.js");
const wandbintegrationout_js_1 = require("./wandbintegrationout.js");
/**
 * The current status of the fine-tuning job.
 */
exports.ClassifierJobOutStatus = {
    Queued: "QUEUED",
    Started: "STARTED",
    Validating: "VALIDATING",
    Validated: "VALIDATED",
    Running: "RUNNING",
    FailedValidation: "FAILED_VALIDATION",
    Failed: "FAILED",
    Success: "SUCCESS",
    Cancelled: "CANCELLED",
    CancellationRequested: "CANCELLATION_REQUESTED",
};
/**
 * The object type of the fine-tuning job.
 */
exports.ClassifierJobOutObject = {
    Job: "job",
};
/**
 * The type of job (`FT` for fine-tuning).
 */
exports.ClassifierJobOutJobType = {
    Classifier: "classifier",
};
/** @internal */
exports.ClassifierJobOutStatus$inboundSchema = z.nativeEnum(exports.ClassifierJobOutStatus);
/** @internal */
exports.ClassifierJobOutStatus$outboundSchema = exports.ClassifierJobOutStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ClassifierJobOutStatus$;
(function (ClassifierJobOutStatus$) {
    /** @deprecated use `ClassifierJobOutStatus$inboundSchema` instead. */
    ClassifierJobOutStatus$.inboundSchema = exports.ClassifierJobOutStatus$inboundSchema;
    /** @deprecated use `ClassifierJobOutStatus$outboundSchema` instead. */
    ClassifierJobOutStatus$.outboundSchema = exports.ClassifierJobOutStatus$outboundSchema;
})(ClassifierJobOutStatus$ || (exports.ClassifierJobOutStatus$ = ClassifierJobOutStatus$ = {}));
/** @internal */
exports.ClassifierJobOutObject$inboundSchema = z.nativeEnum(exports.ClassifierJobOutObject);
/** @internal */
exports.ClassifierJobOutObject$outboundSchema = exports.ClassifierJobOutObject$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ClassifierJobOutObject$;
(function (ClassifierJobOutObject$) {
    /** @deprecated use `ClassifierJobOutObject$inboundSchema` instead. */
    ClassifierJobOutObject$.inboundSchema = exports.ClassifierJobOutObject$inboundSchema;
    /** @deprecated use `ClassifierJobOutObject$outboundSchema` instead. */
    ClassifierJobOutObject$.outboundSchema = exports.ClassifierJobOutObject$outboundSchema;
})(ClassifierJobOutObject$ || (exports.ClassifierJobOutObject$ = ClassifierJobOutObject$ = {}));
/** @internal */
exports.ClassifierJobOutIntegrations$inboundSchema = wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema;
/** @internal */
exports.ClassifierJobOutIntegrations$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 ClassifierJobOutIntegrations$;
(function (ClassifierJobOutIntegrations$) {
    /** @deprecated use `ClassifierJobOutIntegrations$inboundSchema` instead. */
    ClassifierJobOutIntegrations$.inboundSchema = exports.ClassifierJobOutIntegrations$inboundSchema;
    /** @deprecated use `ClassifierJobOutIntegrations$outboundSchema` instead. */
    ClassifierJobOutIntegrations$.outboundSchema = exports.ClassifierJobOutIntegrations$outboundSchema;
})(ClassifierJobOutIntegrations$ || (exports.ClassifierJobOutIntegrations$ = ClassifierJobOutIntegrations$ = {}));
function classifierJobOutIntegrationsToJSON(classifierJobOutIntegrations) {
    return JSON.stringify(exports.ClassifierJobOutIntegrations$outboundSchema.parse(classifierJobOutIntegrations));
}
function classifierJobOutIntegrationsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ClassifierJobOutIntegrations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ClassifierJobOutIntegrations' from JSON`);
}
/** @internal */
exports.ClassifierJobOutJobType$inboundSchema = z.nativeEnum(exports.ClassifierJobOutJobType);
/** @internal */
exports.ClassifierJobOutJobType$outboundSchema = exports.ClassifierJobOutJobType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ClassifierJobOutJobType$;
(function (ClassifierJobOutJobType$) {
    /** @deprecated use `ClassifierJobOutJobType$inboundSchema` instead. */
    ClassifierJobOutJobType$.inboundSchema = exports.ClassifierJobOutJobType$inboundSchema;
    /** @deprecated use `ClassifierJobOutJobType$outboundSchema` instead. */
    ClassifierJobOutJobType$.outboundSchema = exports.ClassifierJobOutJobType$outboundSchema;
})(ClassifierJobOutJobType$ || (exports.ClassifierJobOutJobType$ = ClassifierJobOutJobType$ = {}));
/** @internal */
exports.ClassifierJobOut$inboundSchema = z.object({
    id: z.string(),
    auto_start: z.boolean(),
    model: z.string(),
    status: exports.ClassifierJobOutStatus$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.ClassifierJobOutObject$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.ClassifierJobOutJobType$inboundSchema.default("classifier"),
    hyperparameters: classifiertrainingparameters_js_1.ClassifierTrainingParameters$inboundSchema,
}).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.ClassifierJobOut$outboundSchema = z.object({
    id: z.string(),
    autoStart: z.boolean(),
    model: z.string(),
    status: exports.ClassifierJobOutStatus$outboundSchema,
    createdAt: z.number().int(),
    modifiedAt: z.number().int(),
    trainingFiles: z.array(z.string()),
    validationFiles: z.nullable(z.array(z.string())).optional(),
    object: exports.ClassifierJobOutObject$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.ClassifierJobOutJobType$outboundSchema.default("classifier"),
    hyperparameters: classifiertrainingparameters_js_1.ClassifierTrainingParameters$outboundSchema,
}).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 ClassifierJobOut$;
(function (ClassifierJobOut$) {
    /** @deprecated use `ClassifierJobOut$inboundSchema` instead. */
    ClassifierJobOut$.inboundSchema = exports.ClassifierJobOut$inboundSchema;
    /** @deprecated use `ClassifierJobOut$outboundSchema` instead. */
    ClassifierJobOut$.outboundSchema = exports.ClassifierJobOut$outboundSchema;
})(ClassifierJobOut$ || (exports.ClassifierJobOut$ = ClassifierJobOut$ = {}));
function classifierJobOutToJSON(classifierJobOut) {
    return JSON.stringify(exports.ClassifierJobOut$outboundSchema.parse(classifierJobOut));
}
function classifierJobOutFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ClassifierJobOut$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ClassifierJobOut' from JSON`);
}
//# sourceMappingURL=classifierjobout.js.map