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

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 PostDatasetRecordJudgingInSchema = {
  judgeDefinition: PostJudgeInSchema;
};

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

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

export function postDatasetRecordJudgingInSchemaToJSON(
  postDatasetRecordJudgingInSchema: PostDatasetRecordJudgingInSchema,
): string {
  return JSON.stringify(
    PostDatasetRecordJudgingInSchema$outboundSchema.parse(
      postDatasetRecordJudgingInSchema,
    ),
  );
}
