/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 55e2c042837a
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { BatchError$inboundSchema } from "./batcherror.js";
import { BatchJobStatus$inboundSchema, } from "./batchjobstatus.js";
/** @internal */
export const BatchJob$inboundSchema = z.object({
    id: z.string(),
    object: z.literal("batch").default("batch"),
    input_files: z.array(z.string()),
    metadata: z.nullable(z.record(z.string(), z.any())).optional(),
    endpoint: z.string(),
    model: z.nullable(z.string()).optional(),
    agent_id: z.nullable(z.string()).optional(),
    output_file: z.nullable(z.string()).optional(),
    error_file: z.nullable(z.string()).optional(),
    errors: z.array(BatchError$inboundSchema),
    outputs: z.nullable(z.array(z.record(z.string(), z.any()))).optional(),
    status: BatchJobStatus$inboundSchema,
    created_at: z.int(),
    total_requests: z.int(),
    completed_requests: z.int(),
    succeeded_requests: z.int(),
    failed_requests: z.int(),
    started_at: z.nullable(z.int()).optional(),
    completed_at: z.nullable(z.int()).optional(),
}).transform((v) => {
    return remap$(v, {
        "input_files": "inputFiles",
        "agent_id": "agentId",
        "output_file": "outputFile",
        "error_file": "errorFile",
        "created_at": "createdAt",
        "total_requests": "totalRequests",
        "completed_requests": "completedRequests",
        "succeeded_requests": "succeededRequests",
        "failed_requests": "failedRequests",
        "started_at": "startedAt",
        "completed_at": "completedAt",
    });
});
export function batchJobFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BatchJob$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BatchJob' from JSON`);
}
//# sourceMappingURL=batchjob.js.map