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

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import {
  CreateJudgeRequest,
  CreateJudgeRequest$Outbound,
  CreateJudgeRequest$outboundSchema,
} from "./createjudgerequest.js";

export type JudgeChatCompletionEventRequest = {
  judgeDefinition: CreateJudgeRequest;
};

/** @internal */
export type JudgeChatCompletionEventRequest$Outbound = {
  judge_definition: CreateJudgeRequest$Outbound;
};

/** @internal */
export const JudgeChatCompletionEventRequest$outboundSchema: z.ZodType<
  JudgeChatCompletionEventRequest$Outbound,
  JudgeChatCompletionEventRequest
> = z.object({
  judgeDefinition: CreateJudgeRequest$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    judgeDefinition: "judge_definition",
  });
});

export function judgeChatCompletionEventRequestToJSON(
  judgeChatCompletionEventRequest: JudgeChatCompletionEventRequest,
): string {
  return JSON.stringify(
    JudgeChatCompletionEventRequest$outboundSchema.parse(
      judgeChatCompletionEventRequest,
    ),
  );
}
