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

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

export type UpdateRunInfo = {
  executionTime: Date;
  chunksCount: number;
};

/** @internal */
export type UpdateRunInfo$Outbound = {
  execution_time: string;
  chunks_count: number;
};

/** @internal */
export const UpdateRunInfo$outboundSchema: z.ZodType<
  UpdateRunInfo$Outbound,
  UpdateRunInfo
> = z.object({
  executionTime: z.date().transform(v => v.toISOString()),
  chunksCount: z.int(),
}).transform((v) => {
  return remap$(v, {
    executionTime: "execution_time",
    chunksCount: "chunks_count",
  });
});

export function updateRunInfoToJSON(updateRunInfo: UpdateRunInfo): string {
  return JSON.stringify(UpdateRunInfo$outboundSchema.parse(updateRunInfo));
}
