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

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 TempoTraceScope = {
  /**
   * The name of the span
   */
  name: string;
};

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

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