/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 081aa779ef56
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import * as openEnums from "../../types/enums.js";
import { Checkpoint$inboundSchema } from "./checkpoint.js";
import { ClassifierTargetResult$inboundSchema, } from "./classifiertargetresult.js";
import { ClassifierTrainingParameters$inboundSchema, } from "./classifiertrainingparameters.js";
import { Event$inboundSchema } from "./event.js";
import { JobMetadata$inboundSchema } from "./jobmetadata.js";
import { WandbIntegrationResult$inboundSchema, } from "./wandbintegrationresult.js";
/**
 * The current status of the fine-tuning job.
 */
export const ClassifierFineTuningJobDetailsStatus = {
    Queued: "QUEUED",
    Started: "STARTED",
    Validating: "VALIDATING",
    Validated: "VALIDATED",
    Running: "RUNNING",
    FailedValidation: "FAILED_VALIDATION",
    Failed: "FAILED",
    Success: "SUCCESS",
    Cancelled: "CANCELLED",
    CancellationRequested: "CANCELLATION_REQUESTED",
};
/** @internal */
export const ClassifierFineTuningJobDetailsStatus$inboundSchema = openEnums.inboundSchema(ClassifierFineTuningJobDetailsStatus);
/** @internal */
export const ClassifierFineTuningJobDetailsIntegration$inboundSchema = WandbIntegrationResult$inboundSchema;
export function classifierFineTuningJobDetailsIntegrationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ClassifierFineTuningJobDetailsIntegration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ClassifierFineTuningJobDetailsIntegration' from JSON`);
}
/** @internal */
export const ClassifierFineTuningJobDetails$inboundSchema = z.object({
    id: z.string(),
    auto_start: z.boolean(),
    model: z.string(),
    status: ClassifierFineTuningJobDetailsStatus$inboundSchema,
    created_at: z.int(),
    modified_at: z.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(WandbIntegrationResult$inboundSchema))
        .optional(),
    trained_tokens: z.nullable(z.int()).optional(),
    metadata: z.nullable(JobMetadata$inboundSchema).optional(),
    job_type: z.literal("classifier"),
    hyperparameters: ClassifierTrainingParameters$inboundSchema,
    events: z.array(Event$inboundSchema).optional(),
    checkpoints: z.array(Checkpoint$inboundSchema).optional(),
    classifier_targets: z.array(ClassifierTargetResult$inboundSchema),
}).transform((v) => {
    return 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",
        "classifier_targets": "classifierTargets",
    });
});
export function classifierFineTuningJobDetailsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ClassifierFineTuningJobDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ClassifierFineTuningJobDetails' from JSON`);
}
//# sourceMappingURL=classifierfinetuningjobdetails.js.map