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

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";

export type TracesRequest = {
  searchExpression?: string | null | undefined;
};

/** @internal */
export type TracesRequest$Outbound = {
  search_expression?: string | null | undefined;
};

/** @internal */
export const TracesRequest$outboundSchema: z.ZodType<
  TracesRequest$Outbound,
  TracesRequest
> = z.object({
  searchExpression: z.nullable(z.string()).optional(),
}).transform((v) => {
  return remap$(v, {
    searchExpression: "search_expression",
  });
});

export function tracesRequestToJSON(tracesRequest: TracesRequest): string {
  return JSON.stringify(TracesRequest$outboundSchema.parse(tracesRequest));
}
