/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Activemq = { cacheEnabled?: boolean | undefined; cacheSize?: number | undefined; maxFrameSize?: number | undefined; maxInactivityDuration?: number | undefined; maxInactivityDurationInitialDelay?: number | undefined; platformDetails?: string | undefined; providerName?: string | undefined; providerVersion?: string | undefined; sizePrefixDisabled?: boolean | undefined; stackTraceEnabled?: boolean | undefined; tcpNoDelayEnabled?: boolean | undefined; tightEncodingEnabled?: boolean | undefined; }; /** @internal */ export const Activemq$inboundSchema: z.ZodType< Activemq, z.ZodTypeDef, unknown > = z.object({ cache_enabled: z.boolean().optional(), cache_size: z.number().int().optional(), max_frame_size: z.number().int().optional(), max_inactivity_duration: z.number().int().optional(), max_inactivity_duration_initial_delay: z.number().int().optional(), platform_details: z.string().optional(), provider_name: z.string().optional(), provider_version: z.string().optional(), size_prefix_disabled: z.boolean().optional(), stack_trace_enabled: z.boolean().optional(), tcp_no_delay_enabled: z.boolean().optional(), tight_encoding_enabled: z.boolean().optional(), }).transform((v) => { return remap$(v, { "cache_enabled": "cacheEnabled", "cache_size": "cacheSize", "max_frame_size": "maxFrameSize", "max_inactivity_duration": "maxInactivityDuration", "max_inactivity_duration_initial_delay": "maxInactivityDurationInitialDelay", "platform_details": "platformDetails", "provider_name": "providerName", "provider_version": "providerVersion", "size_prefix_disabled": "sizePrefixDisabled", "stack_trace_enabled": "stackTraceEnabled", "tcp_no_delay_enabled": "tcpNoDelayEnabled", "tight_encoding_enabled": "tightEncodingEnabled", }); }); export function activemqFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Activemq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Activemq' from JSON`, ); }