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

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 {
  TempoTraceAttributeArrayElement,
  TempoTraceAttributeArrayElement$inboundSchema,
} from "./tempotraceattributearrayelement.js";

export type TempoTraceAttributeArrayContainer = {
  /**
   * The values of the array
   */
  values?: Array<TempoTraceAttributeArrayElement> | undefined;
};

/** @internal */
export const TempoTraceAttributeArrayContainer$inboundSchema: z.ZodType<
  TempoTraceAttributeArrayContainer,
  unknown
> = z.object({
  values: z.array(TempoTraceAttributeArrayElement$inboundSchema).optional(),
});

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