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

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";

export type JudgeClassificationOutputOption = {
  value: string;
  description: string;
};

/** @internal */
export const JudgeClassificationOutputOption$inboundSchema: z.ZodType<
  JudgeClassificationOutputOption,
  unknown
> = z.object({
  value: z.string(),
  description: z.string(),
});
/** @internal */
export type JudgeClassificationOutputOption$Outbound = {
  value: string;
  description: string;
};

/** @internal */
export const JudgeClassificationOutputOption$outboundSchema: z.ZodType<
  JudgeClassificationOutputOption$Outbound,
  JudgeClassificationOutputOption
> = z.object({
  value: z.string(),
  description: z.string(),
});

export function judgeClassificationOutputOptionToJSON(
  judgeClassificationOutputOption: JudgeClassificationOutputOption,
): string {
  return JSON.stringify(
    JudgeClassificationOutputOption$outboundSchema.parse(
      judgeClassificationOutputOption,
    ),
  );
}
export function judgeClassificationOutputOptionFromJSON(
  jsonString: string,
): SafeParseResult<JudgeClassificationOutputOption, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => JudgeClassificationOutputOption$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'JudgeClassificationOutputOption' from JSON`,
  );
}
