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

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 GetSpanEvaluationFieldOptions = {
  options: Array<string> | null;
};

/** @internal */
export const GetSpanEvaluationFieldOptions$inboundSchema: z.ZodType<
  GetSpanEvaluationFieldOptions,
  unknown
> = z.object({
  options: z.nullable(z.array(z.string())),
});

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