/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 6b7a95dbe7e5 */ 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 { OTLPDestination, OTLPDestination$inboundSchema, OTLPDestination$Outbound, OTLPDestination$outboundSchema, } from "./otlpdestination.js"; export type ExportDefinition = { destination: OTLPDestination; }; /** @internal */ export const ExportDefinition$inboundSchema: z.ZodType< ExportDefinition, unknown > = z.object({ destination: OTLPDestination$inboundSchema, }); /** @internal */ export type ExportDefinition$Outbound = { destination: OTLPDestination$Outbound; }; /** @internal */ export const ExportDefinition$outboundSchema: z.ZodType< ExportDefinition$Outbound, ExportDefinition > = z.object({ destination: OTLPDestination$outboundSchema, }); export function exportDefinitionToJSON( exportDefinition: ExportDefinition, ): string { return JSON.stringify( ExportDefinition$outboundSchema.parse(exportDefinition), ); } export function exportDefinitionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ExportDefinition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExportDefinition' from JSON`, ); }