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

import * as z from "zod/v3";
import { remap as remap$ } from "../../lib/primitives.js";
import {
  PostJudgeInSchema,
  PostJudgeInSchema$Outbound,
  PostJudgeInSchema$outboundSchema,
} from "./postjudgeinschema.js";

export type PostChatCompletionEventJudgingInSchema = {
  judgeDefinition: PostJudgeInSchema;
};

/** @internal */
export type PostChatCompletionEventJudgingInSchema$Outbound = {
  judge_definition: PostJudgeInSchema$Outbound;
};

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

export function postChatCompletionEventJudgingInSchemaToJSON(
  postChatCompletionEventJudgingInSchema:
    PostChatCompletionEventJudgingInSchema,
): string {
  return JSON.stringify(
    PostChatCompletionEventJudgingInSchema$outboundSchema.parse(
      postChatCompletionEventJudgingInSchema,
    ),
  );
}
