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

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

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

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