/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: eae3a2cf29a5
 */

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";

export type TrainingFile = {
  fileId: string;
  weight?: number | undefined;
};

/** @internal */
export type TrainingFile$Outbound = {
  file_id: string;
  weight: number;
};

/** @internal */
export const TrainingFile$outboundSchema: z.ZodType<
  TrainingFile$Outbound,
  TrainingFile
> = z.object({
  fileId: z.string(),
  weight: z.number().default(1),
}).transform((v) => {
  return remap$(v, {
    fileId: "file_id",
  });
});

export function trainingFileToJSON(trainingFile: TrainingFile): string {
  return JSON.stringify(TrainingFile$outboundSchema.parse(trainingFile));
}
