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

import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import {
  PaginatedResultJudgePreview,
  PaginatedResultJudgePreview$inboundSchema,
} from "./paginatedresultjudgepreview.js";

export type ListJudgesResponse = {
  judges: PaginatedResultJudgePreview;
};

/** @internal */
export const ListJudgesResponse$inboundSchema: z.ZodType<
  ListJudgesResponse,
  unknown
> = z.object({
  judges: PaginatedResultJudgePreview$inboundSchema,
});

export function listJudgesResponseFromJSON(
  jsonString: string,
): SafeParseResult<ListJudgesResponse, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => ListJudgesResponse$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'ListJudgesResponse' from JSON`,
  );
}
